Hello,
i would like to clear the current playlist of a player automatically, when the the player is switched off.
Are there any ideas, or is there a plugin that could do this?
Thanks for any help.
Results 1 to 10 of 11
-
2009-04-19, 02:20 #1Senior Member
- Join Date
- Jun 2006
- Location
- Portland, OR
- Posts
- 564
Clear playlist automatically when player is switched off
2 x Squeezebox 3 - 1 x Squeezebox Touch - SSOTS 4.14 - Squeezecenter 7.7.3 - QNAP TS439 Pro (3.6.3) - 4 x 500 GB Hitachi (RAID5)
-
2009-04-19, 07:41 #2
If you are turning the SB off using the IR remote, clearing the playlist is pretty easy. From the now-playing screen, hit "left" and then "+". This clears the playlist in two easy button presses.
What you are suggesting is certainly doable from within a plugin. If there isn't one out there already that will do this sort of thing, it's not a bad idea for one: being able to associate user-composed CLI requests with subscribe-able SC actions.
-
2009-04-19, 07:50 #3
Actually, you should be able to make KDF's ExecuteScript plugin do exactly what you want. See: http://code.google.com/p/kdfplugins/downloads/list
You'll need to write a script that sends a CLI request to SqueezeCenter for a "playlist clear". The form of the script will depend on the operating system that you're using on your server.
-
2009-04-19, 11:32 #4Senior Member
- Join Date
- Oct 2005
- Posts
- 2,769
Just curious -- why?
There used to be a bug that Squeezeboxes that had previously been playing a Random Mox would turn on & resume playing all on their own. Before that was fixed, I would manually clear the playlist when turning off an SB to be sure that bug wouldn't kick in. What's your reason?http://www.tux.org/~peterw/
Note: The best way to reach me is email or PM, as I don't spend time on the forums.
Free plugins: AllQuiet Auto Dim/AutoDisplay BlankSaver ContextMenu DenonSerial
FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
SettingsManager SleepFade StatusFirst SyncOptions VolumeLock
-
2009-04-19, 12:04 #5Senior Member
- Join Date
- Jun 2006
- Location
- Portland, OR
- Posts
- 564
Hi,
first of all, thanks for the replies.
Indeed, it is curious. I just wana try something.
Since i installed MusicIP and Spicefly on my NAS, i observe problems with HDD standby, when i played Music with MusicIP or spicefly enabled. When i switch the SB just off, the NAS does not go into standby. When i disconnect the SB, or switch it to SqueezeNetwork and back, or if i clear the playlist, the NAS goes into standby.
I already thought about the execute plugin. Nevertheless, up to now i have not really found a tutorial for the cli commands. So i don't know, how to send the command clear playlist to the corresponding player.
EDI: searched at the wrong place, its locally included in SC :-)
I know, that this is not the best solution, but it would be a workaround till i found the real root cause.
One thing i know is, that SC accesses the database frequently, when the HDD does not go into standby. This is not the case, when the playlist is cleared, or the player's connection is interupted for a short time.Last edited by mr_hyde; 2009-04-19 at 13:38.
2 x Squeezebox 3 - 1 x Squeezebox Touch - SSOTS 4.14 - Squeezecenter 7.7.3 - QNAP TS439 Pro (3.6.3) - 4 x 500 GB Hitachi (RAID5)
-
2009-04-19, 13:47 #6
If you can find a binary for netcat for your nas, then your script should look something like this:
..fixing up the $PlayerMAC value with the mac address of your SB3, of course.Code:#!/bin/sh PlayerMAC='00:04:20:10:0A:0B' SCIp='127.0.0.1' CLIPort='9090' echo $PlayerMAC playlist clear | nc -w 3 $SCIp $CLIPort
Last edited by gharris999; 2009-04-19 at 13:49.
-
2009-04-19, 14:00 #7Senior Member
- Join Date
- Jun 2006
- Location
- Portland, OR
- Posts
- 564
2 x Squeezebox 3 - 1 x Squeezebox Touch - SSOTS 4.14 - Squeezecenter 7.7.3 - QNAP TS439 Pro (3.6.3) - 4 x 500 GB Hitachi (RAID5)
-
2009-04-19, 14:13 #8Senior Member
- Join Date
- Jun 2006
- Location
- Portland, OR
- Posts
- 564
Just one more question:
Is there a possibility to have different scripts for different players, or is it possible to identify the playerid which is responsible for the execution of the script?
Thanks for your help2 x Squeezebox 3 - 1 x Squeezebox Touch - SSOTS 4.14 - Squeezecenter 7.7.3 - QNAP TS439 Pro (3.6.3) - 4 x 500 GB Hitachi (RAID5)
-
2009-04-19, 17:07 #9Senior Member
- Join Date
- Oct 2005
- Posts
- 2,769
Edit the executescript plugin to pass that info? Convention is to use a Perl var named $client, in which case you'd pass $client->id() to send the MAC addr. Or just fully mod it for your needs and call $client->executeRequest to send the cli command all in Perl instead of invoking an external script.
It'd be overkill, but you could also use PowerCenter. Give each player a different fake X10 code and write a shell script to invoke instead of 'br' that looks at the args passed by PowerCenter. Only act if PowerCenter is sending an off command, and internally translate the fake X10 code to your MAC address.http://www.tux.org/~peterw/
Note: The best way to reach me is email or PM, as I don't spend time on the forums.
Free plugins: AllQuiet Auto Dim/AutoDisplay BlankSaver ContextMenu DenonSerial
FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
SettingsManager SleepFade StatusFirst SyncOptions VolumeLock
-
2009-04-19, 22:43 #10Senior Member
- Join Date
- Jun 2006
- Location
- Portland, OR
- Posts
- 564
Thanks for the feedback.
There was one thing, i forgott to mention. When i conduct a rescan of the library the NAS also seems to go into standby. This is player independent :-).
I will try this and then i've got more time to find the real root cause.2 x Squeezebox 3 - 1 x Squeezebox Touch - SSOTS 4.14 - Squeezecenter 7.7.3 - QNAP TS439 Pro (3.6.3) - 4 x 500 GB Hitachi (RAID5)

Reply With Quote

