[Slim-Checkins] r33904 - in /7.8/trunk: ./ server/Changelog7.html server/Slim/Control/Commands.pm server/Slim/Player/ProtocolHandlers.pm server/Slim/Plugin/SavePlaylist/Plugin.pm server/Slim/Plugin/UPnP/MediaServer/ConnectionManager.pm server/scanner.pl

[email protected] Mon, 26 Mar 2012 13:47:17 -0000
Newsgroups gmane.music.equipment.slimdevices.cvs
Message-ID <[email protected]>
Author: agrundman
Date: Mon Mar 26 06:47:17 2012
New Revision: 33904

URL: http://svn.slimdevices.com/slim?rev=33904&view=rev
Log:
 r80714@macbookpro (orig r33890):  agrundman | 2012-03-12 16:19:19 -0400
 Fixed bug 17885, DLNA 7.3.28.2: GetProtocolInfo needs all DLNA profiles listed first
 r80715@macbookpro (orig r33891):  agrundman | 2012-03-12 16:40:17 -0400
 Fixed bug 17890, remove the ability to pass scanner.pl a specific directory to scan. This is not supported by the new media directory and scanner code.
 r80716@macbookpro (orig r33892):  agrundman | 2012-03-12 17:26:45 -0400
 Fixed bug 17422, fix utf8 chars in db favorites
 r80726@macbookpro (orig r33893):  mherger | 2012-03-13 03:24:55 -0400
 Fixed Bug: 15001
 Description: Only one pop right is required despite needing to back up 2 levels.

Modified:
    7.8/trunk/   (props changed)
    7.8/trunk/server/Changelog7.html
    7.8/trunk/server/Slim/Control/Commands.pm
    7.8/trunk/server/Slim/Player/ProtocolHandlers.pm
    7.8/trunk/server/Slim/Plugin/SavePlaylist/Plugin.pm
    7.8/trunk/server/Slim/Plugin/UPnP/MediaServer/ConnectionManager.pm
    7.8/trunk/server/scanner.pl

Propchange: 7.8/trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Mon Mar 26 06:47:17 2012
@@ -25,7 +25,7 @@
 60ad55ce-86ed-0310-8cf8-f9d879be5ea1:/7.5/trunk:32834
 60ad55ce-86ed-0310-8cf8-f9d879be5ea1:/7.6/branches/onebrowser:32502
 60ad55ce-86ed-0310-8cf8-f9d879be5ea1:/7.6/trunk:33593
-60ad55ce-86ed-0310-8cf8-f9d879be5ea1:/7.7/trunk:33887
+60ad55ce-86ed-0310-8cf8-f9d879be5ea1:/7.7/trunk:33893
 60ad55ce-86ed-0310-8cf8-f9d879be5ea1:/branches/7.0:17793
 60ad55ce-86ed-0310-8cf8-f9d879be5ea1:/branches/cometd-refactor:13305
 60ad55ce-86ed-0310-8cf8-f9d879be5ea1:/private-branches/ray-svk:15970

Modified: 7.8/trunk/server/Changelog7.html
URL: http://svn.slimdevices.com/slim/7.8/trunk/server/Changelog7.html?rev=33904&r1=33903&r2=33904&view=diff
==============================================================================
--- 7.8/trunk/server/Changelog7.html (original)
+++ 7.8/trunk/server/Changelog7.html Mon Mar 26 06:47:17 2012
@@ -22,9 +22,17 @@
 		<li>New packages for the ReadyNAS family of storage systems to support their ARM processor based devices.</li>
 	</ul>
 	<br />
-
-	<li>Bug Fixes:</li>
-	<ul>
+	
+	<li>Scanner Changes:</li>
+	<ul>
+		<li>The command-line scanner no longer supports scanning a path passed on the command-line. All paths to be scanned must be listed in the prefs file.</li>
+	</ul>
+	<br />
+
+	<li>Bug Fixes:</li>
+	<ul>
+		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=15001">#15001</a> - Save playlist plugin locks ip3k UI</li>
+		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17422">#17422</a> - Artist, Album and Genre Favorites with non-latin characters don't work from Player UI</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17680">#17680</a> - General install issue of LMS on ReadyNAS Pro (ends up with an install error)</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17777">#17777</a> - New & changed scan does not scan playlists</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17807">#17807</a> - Windows installer is showing German messages if no localization is available</li>
@@ -42,6 +50,7 @@
 		<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=17881">#17881</a> - BMF scan corrupts dB replacing title with file name</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>
+		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17885">#17885</a> - DLNA 7.3.28.2: GetProtocolInfo needs all DLNA profiles listed first</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17893">#17893</a> - Unnecessary push into current playlist when stopping playback</li>
 	</ul>
 	<br />

Modified: 7.8/trunk/server/Slim/Control/Commands.pm
URL: http://svn.slimdevices.com/slim/7.8/trunk/server/Slim/Control/Commands.pm?rev=33904&r1=33903&r2=33904&view=diff
==============================================================================
--- 7.8/trunk/server/Slim/Control/Commands.pm (original)
+++ 7.8/trunk/server/Slim/Control/Commands.pm Mon Mar 26 06:47:17 2012
@@ -3452,6 +3452,11 @@
 
 				if (!utf8::is_utf8($value) && !utf8::decode($value)) { $log->warn("The following value is not UTF-8 encoded: $value"); }
 
+				if (utf8::is_utf8($value)) {
+					utf8::decode($value);
+					utf8::encode($value);
+				}
+
 				$class = ucfirst($1);
 				$obj   = Slim::Schema->single( $class, { $key => $value } );
 				

Modified: 7.8/trunk/server/Slim/Player/ProtocolHandlers.pm
URL: http://svn.slimdevices.com/slim/7.8/trunk/server/Slim/Player/ProtocolHandlers.pm?rev=33904&r1=33903&r2=33904&view=diff
==============================================================================
--- 7.8/trunk/server/Slim/Player/ProtocolHandlers.pm (original)
+++ 7.8/trunk/server/Slim/Player/ProtocolHandlers.pm Mon Mar 26 06:47:17 2012
@@ -142,7 +142,14 @@
 	}
 
 	elsif ($url =~ /^db:album\.(\w+)=(.+)/) {
-		my $album = Slim::Schema->search('Album', { $1 => Slim::Utils::Misc::unescape($2) })->first;
+		my $value = Slim::Utils::Misc::unescape($2);
+		
+		if (utf8::is_utf8($value)) {
+			utf8::decode($value);
+			utf8::encode($value);
+		}
+		
+		my $album = Slim::Schema->search('Album', { $1 => $value })->first;
 
 		if ($album && $album->artwork) {
 			return 'music/' . $album->artwork . '/cover.png';

Modified: 7.8/trunk/server/Slim/Plugin/SavePlaylist/Plugin.pm
URL: http://svn.slimdevices.com/slim/7.8/trunk/server/Slim/Plugin/SavePlaylist/Plugin.pm?rev=33904&r1=33903&r2=33904&view=diff
==============================================================================
--- 7.8/trunk/server/Slim/Plugin/SavePlaylist/Plugin.pm (original)
+++ 7.8/trunk/server/Slim/Plugin/SavePlaylist/Plugin.pm Mon Mar 26 06:47:17 2012
@@ -176,7 +176,6 @@
 			
 	} elsif ($type eq 'backspace') {
 
-		Slim::Buttons::Common::popModeRight($client);
 		Slim::Buttons::Common::popModeRight($client);
 	
 	} else {

Modified: 7.8/trunk/server/Slim/Plugin/UPnP/MediaServer/ConnectionManager.pm
URL: http://svn.slimdevices.com/slim/7.8/trunk/server/Slim/Plugin/UPnP/MediaServer/ConnectionManager.pm?rev=33904&r1=33903&r2=33904&view=diff
==============================================================================
--- 7.8/trunk/server/Slim/Plugin/UPnP/MediaServer/ConnectionManager.pm (original)
+++ 7.8/trunk/server/Slim/Plugin/UPnP/MediaServer/ConnectionManager.pm Mon Mar 26 06:47:17 2012
@@ -238,7 +238,15 @@
 		}
 	}
 	
-	return join( ',', @formats );
+	# Bug 17885, sort all wildcard formats to the end of the list
+	# Based on example at http://perldoc.perl.org/functions/sort.html
+	my @sortedFormats = sort {
+		($a =~ /(\*)$/)[0] cmp ($b =~ /(\*)$/)[0]
+		||
+		uc($a) cmp uc($b)
+	} @formats;
+	
+	return join( ',', @sortedFormats );
 }		
 
 1;

Modified: 7.8/trunk/server/scanner.pl
URL: http://svn.slimdevices.com/slim/7.8/trunk/server/scanner.pl?rev=33904&r1=33903&r2=33904&view=diff
==============================================================================
--- 7.8/trunk/server/scanner.pl (original)
+++ 7.8/trunk/server/scanner.pl Mon Mar 26 06:47:17 2012
@@ -166,7 +166,7 @@
 		'debug'   => $debug,
 	});
 
-	if ($help || (!$rescan && !$wipe && !$playlists && !scalar @ARGV)) {
+	if ($help || (!$rescan && !$wipe && !$playlists)) {
 		usage();
 		exit;
 	}
@@ -311,29 +311,16 @@
 	# exceptions properly, it should croak(), so the exception is
 	# propagated to the higher levels.
 	#
-	# We've been passed an explict path or URL - deal with that.
-	if (scalar @ARGV) {
-
-		for my $url (@ARGV) {
-
-			eval { Slim::Utils::Scanner->scanPathOrURL({ 
-				'url'      => $url,
-				'progress' => 1, 
-			}) };
-		}
-
-	} else {
-
-		# Otherwise just use our Importers to scan.
-		eval {
-
-			if ($wipe) {
-				Slim::Music::Import->resetImporters;
-			}
-
-			$changes = Slim::Music::Import->runScan;
-		};
-	}
+
+	# Use our Importers to scan.
+	eval {
+
+		if ($wipe) {
+			Slim::Music::Import->resetImporters;
+		}
+
+		$changes = Slim::Music::Import->runScan;
+	};
 
 	if ($@) {
 
@@ -408,7 +395,7 @@
 
 sub usage {
 	print <<EOF;
-Usage: $0 [debug options] [--rescan] [--wipe] <path or URL>
+Usage: $0 [debug options] [--rescan] [--wipe]
 
 Command line options:
 
@@ -434,9 +421,7 @@
 	
 Examples:
 
-	$0 --rescan /Users/dsully/Music
-
-	$0 http://www.somafm.com/groovesalad.pls
+	$0 --rescan
 
 EOF