[Slim-Checkins] r33890 - in /7.7/trunk/server: Changelog7.html Slim/Plugin/UPnP/MediaServer/ConnectionManager.pm

[email protected] Mon, 12 Mar 2012 20:19:19 -0000
Newsgroups gmane.music.equipment.slimdevices.cvs
Message-ID <[email protected]>
Author: agrundman
Date: Mon Mar 12 13:19:19 2012
New Revision: 33890

URL: http://svn.slimdevices.com/slim?rev=33890&view=rev
Log:
Fixed bug 17885, DLNA 7.3.28.2: GetProtocolInfo needs all DLNA profiles listed first

Modified:
    7.7/trunk/server/Changelog7.html
    7.7/trunk/server/Slim/Plugin/UPnP/MediaServer/ConnectionManager.pm

Modified: 7.7/trunk/server/Changelog7.html
URL: http://svn.slimdevices.com/slim/7.7/trunk/server/Changelog7.html?rev=33890&r1=33889&r2=33890&view=diff
==============================================================================
--- 7.7/trunk/server/Changelog7.html (original)
+++ 7.7/trunk/server/Changelog7.html Mon Mar 12 13:19:19 2012
@@ -25,6 +25,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.7/trunk/server/Slim/Plugin/UPnP/MediaServer/ConnectionManager.pm
URL: http://svn.slimdevices.com/slim/7.7/trunk/server/Slim/Plugin/UPnP/MediaServer/ConnectionManager.pm?rev=33890&r1=33889&r2=33890&view=diff
==============================================================================
--- 7.7/trunk/server/Slim/Plugin/UPnP/MediaServer/ConnectionManager.pm (original)
+++ 7.7/trunk/server/Slim/Plugin/UPnP/MediaServer/ConnectionManager.pm Mon Mar 12 13:19:19 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;