Bugzilla – Bug 716
REQ: command to return pathname of currently playlist
Last modified: 2008-12-18 11:52:29 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.
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();
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.
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.
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.
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.
Routine bug db maintenance; removing old versions which cause confusion. I apologize for the inconvenience.