Song and Playlist repeat from a task

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
James D
Senior Member
Posts: 133
Joined: Wed Jun 06, 2007 3:30 pm
Location: Baja California

Song and Playlist repeat from a task

Post by James D »

For all the newbie on the forum that want a repeat buttons for their winamp device. I wanted to repeat a selected song or playlist. But my scripting experience is still a little limited. I was able to get it to work with a Task in HB.

Here is what I did.

Create 2 new property under your winamp device.
1 needs to be an Alpha type box--> Call it "REPEAT CMD"
1 needs to be a numeric type box--> call it "REPEAT SONG NUMBER"

Now create your task

If 'WINAMP DEVICE.REPEAT CMD' is Equal to 'SEL SONG' and
If 'WINAMP DEVICE.A/V Status' is Equal to 'Playing' Then
Change 'WINAMP DEVICE.REPEAT SONG NUMBER' to '%%WINAMP DEVICE.Play List Song Number%%'
Change 'WINAMP DEVICE.REPEAT CMD' to 'SONG'
Else if 'WINAMP DEVICE.REPEAT CMD' is equal to 'SONG' and
If 'WINAMP DEVICE.Play List Song Number' is Not Equal '%%WINAMP DEVICE.REPEAT SONG NUMBER%%' then
Change 'WINAMP DEVICE.Play List Song Number' to '%%WINAMP DEVICE.REPEAT SONG NUMBER%%'
Else if 'WINAMP DEVICE.REPEAT CMD' is equal to 'PLAYLIST' and
If 'WINAMP DEVICE.A/V Status' is Equal to 'Stopped' Then
Change 'WINAMP DEVICE.A/V Status' to 'Playing'
Else If 'WINAMP DEVICE.Play List Song Number' is Greater than '%%WINAMP PLAYLIST.Playlist Track Count%%' then
Change 'WINAMP DEVICE.Play List Song Number' to '0'

Make sure that the task run when ever the "Conditions are met"

On my ShutDown task for HB I also made sure that HB changed to OFF. This kills the task, since OFF has not commands to to do.

Now in your theme, create 3 property change button and associate to your 'WINAMP DEVICE.REPEAT CMD'
On on button the valve should be 'SEL SONG', the other called 'PLAYLIST', and the last called 'OFF'.

I added indicator too, and a repeat status. The task is still not ironed-out. Like when you have the Playlist Repeat is selected you can not stop the music. Just like quirks I have to work out. I have my computer tell me the "Playlist Mode is On" when I try to stop my winamp device to give me audio conformation to change my repeat. Attached is a screenshot of my music theme with additional music repeat buttons.

I just thought I should share.
Attachments
REPEAT.jpg
REPEAT.jpg (136.91 KiB) Viewed 14077 times
Post Reply