[Slim-Checkins] r33843 - in /7.7/trunk/server: Changelog7.html Slim/Menu/TrackInfo.pm

[email protected] Wed, 15 Feb 2012 20:44:08 -0000
Newsgroups gmane.music.equipment.slimdevices.cvs
Message-ID <[email protected]>
Author: mherger
Date: Wed Feb 15 12:44:07 2012
New Revision: 33843

URL: http://svn.slimdevices.com/slim?rev=33843&view=rev
Log:
Bug: 17876
Fixed Bug: 17889
Description: revert removal of unnecessary items in Now Playing context menu. This needs some more work to make sure the indexes of the remaining items are correct.

Modified:
    7.7/trunk/server/Changelog7.html
    7.7/trunk/server/Slim/Menu/TrackInfo.pm

Modified: 7.7/trunk/server/Changelog7.html
URL: http://svn.slimdevices.com/slim/7.7/trunk/server/Changelog7.html?rev=33843&r1=33842&r2=33843&view=diff
==============================================================================
--- 7.7/trunk/server/Changelog7.html (original)
+++ 7.7/trunk/server/Changelog7.html Wed Feb 15 12:44:07 2012
@@ -18,7 +18,6 @@
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17841">#17841</a> - directory traversal vulnerability in the web UI code</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17852">#17852</a> - Support for new ReadyNAS Duo and NV+ V2 devices</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17855">#17855</a> - Only enable single output channel mode if actively synced</li>
-		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17876">#17876</a> - Unnecessary items in context menu for current-playlist tracks</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17877">#17877</a> - Resume after underrun broken for synchronized (ip3k) players</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17882">#17882</a> - Fixed wrong MP4 MIME type for DLNA (audio/m4a was used instead of audio/mp4)</li>
 	</ul>

Modified: 7.7/trunk/server/Slim/Menu/TrackInfo.pm
URL: http://svn.slimdevices.com/slim/7.7/trunk/server/Slim/Menu/TrackInfo.pm?rev=33843&r1=33842&r2=33843&view=diff
==============================================================================
--- 7.7/trunk/server/Slim/Menu/TrackInfo.pm (original)
+++ 7.7/trunk/server/Slim/Menu/TrackInfo.pm Wed Feb 15 12:44:07 2012
@@ -441,10 +441,6 @@
 	# "Play Song" in current playlist context is 'jump'
 	if ( $tags->{menuContext} eq 'playlist' ) {
 		
-		# do not add item if this is current track and already playing
-		return [] if $tags->{playlistIndex} == Slim::Player::Source::playingSongIndex($client)
-					&& $client->isPlaying();
-		
 		$actions = {
 			go => {
 				player => 0,
@@ -523,9 +519,6 @@
 	my $actions;
 	# remove from playlist
 	if ( $cmd eq 'delete' ) {
-		
-		# Do not add this item if only one item in playlist
-		return [] if Slim::Player::Playlist::count($client) < 2;
 
 		$actions = {
 			go => {
@@ -541,14 +534,8 @@
 
 	# play next in the playlist context
 	} elsif ( $cmd eq 'playlistnext' ) {
-		
-		# Do not add this item if only one item in playlist
-		return [] if Slim::Player::Playlist::count($client) < 2;
 
 		my $moveTo = Slim::Player::Source::playingSongIndex($client) || 0;
-		
-		# do not add item if this is current track or already the next track
-		return [] if $tags->{playlistIndex} == $moveTo || $tags->{playlistIndex} == $moveTo+1;
 		
 		if ( $tags->{playlistIndex} > $moveTo ) {
 			$moveTo = $moveTo + 1;