PDA

View Full Version : RFE: Add option for saving sleep time and randomize playlist with favorites



rcampbel3
2011-02-06, 17:20
I'd like to be able to tweak my favorites to include a 'sleep 90' so that I can add streaming stations and have them just play for 90 minutes. I know I can manually go to the 'settings' and 'sleep' menu. I just want the ability to save those preferences in the favorites.

For example, baby's bedtime - I have a few lullaby albums, and I'd like to include streaming lullaby stations, but I don't want them to play all night, and I don't want to train everyone else in the house how to set the sleep settings -- I just want to preconfigure it.

Similarly, I would like to be able to save a favorite of all tracks by $ARTIST and then set the favorite to randomize the playlist. In general, though, I don't want randomize set, or rather, I want the ability for a favorite's randomize/sequential/repeat setting to OVERRIDE local player setting.

-Ross

peterw
2011-02-08, 21:29
I'm *soo* close to being able to offer you that. A while back I worked on a plugin that adds two new "protocols" for Squeezebox. One is for executing CLI commands like "sleep 900" (900 = 15 minutes). Another is for executing commands on the machine running Squeezebox Server. The idea is that these become "tracks" that you can add to playlists. So you could have a playlist like

squeezecli: p0=sleep&p1=5400
http: //somestreamingstation.com/foo.mp3

that would start the sleep timer before opening the lullaby stream.

The randomized favorite might be trickier. You might need two playlists, with the randomized playlist looking like the following (spaces added after the colon to appease the forum software)

squeezecli: p0=playlist&p1=shuffle&p2=2
squeezecli: p0=playlist&p1=clear
squeezecli: p0=playlist&p1=add&p2=/path/to/playlist
squeezecli: p0=playlist&p1=shuffle&p2=0
squeezecli: p0=playlist&p1=play

to force a new reshuffling of your playlist and revert to non-shuffled behavior right afterwards.

But there's something a little messed up in my code I haven't had time to track down; the effect is that the squeezecli command executes but SBS never moves to the next track. My hope was to fix that and then make a nice web UI to simplify adding squeezecli: "tracks" to playlists.

Does that sound about right, or too darn complex?

peterw
2011-02-08, 21:36
Oh, if you want to look at what I have (broken as it is), the code is in http://www.tux.org/~peterw/slim/slim7/TESTING/SqueezeCLIHandler/ and you can install it from my test repo, http://www.tux.org/~peterw/slim/slim7/repodata-test.xml. The plugin name is SqueezeCLIHandler.