Thank you for your donation!


Idea: Extend URL API to clear / load / play a playlist
#1
I don’t think this is implemented currently, but I think it would be really useful to have a “play playlist x” URL. You can do volume and stop via URLs, but not play. 

My use case is unusual, but might extend to others’ uses.

I only listen to AirPlay or one of two radio stations for 99% of the time. I have 4 physical control buttons on a “remote” Pi which is used to control Moode.

Vol Up press: http request
Vol Down press: http request
Radio 4: ssh connection made to issue the clear / load / play command for playlist “radio4”
Radio 2: ssh connection made to issue the clear / load / play command for playlist “radio2”

So I’m thinking a .sh script to take the argument passed via the URL and run the mpc commands. Just like the vol.sh.

What do you reckon?
Reply
#2
(02-06-2019, 04:22 PM)tristanc Wrote: I don’t think this is implemented currently, but I think it would be really useful to have a “play playlist x” URL. You can do volume and stop via URLs, but not play. 

My use case is unusual, but might extend to others’ uses.

I only listen to AirPlay or one of two radio stations for 99% of the time. I have 4 physical control buttons on a “remote” Pi which is used to control Moode.

Vol Up press: http request
Vol Down press: http request
Radio 4: ssh connection made to issue the clear / load / play command for playlist “radio4”
Radio 2: ssh connection made to issue the clear / load / play command for playlist “radio2”

So I’m thinking a .sh script to take the argument passed via the URL and run the mpc commands. Just like the vol.sh.

What do you reckon?

@tristanc

I reckon you should just do it. Smile

As you surmise, the basic machinery is there. 

Like vol.sh, you could create a /var/www/playitagainsam.sh script with appropriate options and invoke it via http://moode/command?cmd=playitagainsam.sh with appropriate parameters. (See Tim's recent reply to another poster http://moodeaudio.org/forum/showthread.p...98#pid7698

You'll likely have to reinstall the script after a moOde update.

Regards,
Kent
Reply
#3
(02-06-2019, 05:17 PM)TheOldPresbyope Wrote: I reckon you should just do it. Smile

As you surmise, the basic machinery is there.

Yep, easy as pi. A quick edit of vol.sh did it. Thanks!

T
Reply


Forum Jump: