[Slim-Checkins] r10133 - /branches/6.5/server/Slim/Control/Commands.pm

dsully at svn.slimdevices.com dsully at svn.slimdevices.com
Mon Oct 2 13:16:43 PDT 2006


Author: dsully
Date: Mon Oct  2 13:16:42 2006
New Revision: 10133

URL: http://svn.slimdevices.com?rev=10133&view=rev
Log:
Bug: 2373
Description: Merge from trunk -r 10131:10132

Modified:
    branches/6.5/server/Slim/Control/Commands.pm

Modified: branches/6.5/server/Slim/Control/Commands.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Control/Commands.pm?rev=10133&r1=10132&r2=10133&view=diff
==============================================================================
--- branches/6.5/server/Slim/Control/Commands.pm (original)
+++ branches/6.5/server/Slim/Control/Commands.pm Mon Oct  2 13:16:42 2006
@@ -1199,7 +1199,25 @@
 	# find the songs
 	my @tracks = ();
 
-	if (defined(my $playlist_id = $request->getParam('playlist_id'))) {
+	# Bug: 2373 - allow the user to specify a playlist name
+	my $playlist_id = 0;
+
+	if (defined(my $playlist_name = $request->getParam('playlist_name'))) {
+
+		my $playlistObj = Slim::Schema->single('Playlist', { 'title' => $playlist_name });
+
+		if (blessed($playlistObj)) {
+
+			$playlist_id = $playlistObj->id;
+		}
+	}
+
+	if (!$playlist_id && $request->getParam('playlist_id')) {
+
+		$playlist_id = $request->getParam('playlist_id');
+	}
+
+	if ($playlist_id) {
 
 		# Special case...
 		my $playlist = Slim::Schema->find('Playlist', $playlist_id);



More information about the checkins mailing list