Bug 716 - REQ: command to return pathname of currently playlist
: REQ: command to return pathname of currently playlist
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: CLI
: 5.x or older
: All All
: P2 enhancement (vote)
: ---
Assigned To: Blackketter Dean
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-06 22:59 UTC by Jake Hawkes
Modified: 2008-12-18 11:52 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jake Hawkes 2004-12-06 22:59:32 UTC
While there are many commands to retrieve information for the currently 
playing song in the playlist, there are no commands (from what I can see) for 
getting the pathname to the .m3u file of the current playlist. 
 
I would like this so that my external controlling client can update the 
currently playing playlist.
Comment 1 Jake Hawkes 2004-12-07 00:05:45 UTC
Here is my proposed solution: 
Index: Client.pm 
=================================================================== 
RCS file: /cvsroot/slim/server/Slim/Player/Client.pm,v 
retrieving revision 1.60 
diff -r1.60 Client.pm 
1429c1429,1432 
<       @_ ? ($r->[92] = shift) : $r->[92]; 
--- 
>       my $i; 
>       @_ ? ($i = shift) : return $r->[92]; 
>       #@_ ? ($r->[92] = shift) : $r->[92]; 
>       @_ ? ($r->[92]->[$i] = shift) : $r->[92]->[$i]; 
 
 
 
Index: Command.pm 
=================================================================== 
RCS file: /cvsroot/slim/server/Slim/Control/Command.pm,v 
retrieving revision 1.50 
diff -r1.50 Command.pm 
546a547,548 
>                       } elsif ($p1 eq "playlistname") { 
>                               $p2 = $client->currentPlaylist(); 
 
 
Comment 2 Fred 2004-12-07 02:03:38 UTC
I do not understand what you will do with the path? Have the external client go and modify it? Or just 
read it to know what the playlist is?
Unless I am mistaken, what you will get back with such a command in all cases is the path to the 
internal SlimServer state playlist.

I have been working on the extended CLI API and it adds browsing to the CLI. There is a command that 
could return the entire data about the playing playlist. I am just trying to figure out if what you need to 
do is covered by the extended CLI API.
Comment 3 Jake Hawkes 2004-12-07 18:46:36 UTC
My intent was to be able to save the playlist after making modifications to it 
either through the client, or outside the client (from my app). 
 
For example, I have a "zap" button, that deletes the current playing track 
from the current playlist.   
 
Currently, through the web page, if I delete a song from the current playlist, 
it doesn't update the playlist on the disk.  It does remember the now modified 
playlist for later, but in an internal format. 
 
My application therefore needs to know the pathname of the current playlist in 
order to pass that along in the "playlist save ..." command. 
Comment 4 Blackketter Dean 2004-12-12 22:20:13 UTC
I added for the latest nightly, the "playlist url" and "playlist name" commands to the CLI.  Try them out 
and let me know how they work for you.
Comment 5 Chris Owens 2006-06-16 14:42:29 UTC
There are 536 bugs in the database with targets of '---' that were fixed prior to new year 2006.  I am setting them to targets of 6.2.1 to keep them from showing up in my queries.
Comment 6 Chris Owens 2008-12-18 11:52:29 UTC
Routine bug db maintenance; removing old versions which cause confusion.  I apologize for the inconvenience.