Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


One button / command to load & play random track?
#5
(02-27-2019, 12:31 PM)Tim Curtis Wrote: You can send commands via the Web API for example

MPD commands

http://moode/command/?cmd=random 1
http://moode/command/?cmd=random 0

Yeah, that's what I tried. But it seems you can't switch off the "ashuffle random" using http://moode/command/?cmd=random 0

Code:
pi@moode-kitchen:~ $ mpc pause
Johann Strauss - The Blue Danube (Reprise)
[paused]  #1/2   0:07/8:21 (1%)
volume: 25%   repeat: off   random: on    single: off   consume: on
pi@moode-kitchen:~ $ mpc random 0
Johann Strauss - The Blue Danube (Reprise)
[paused]  #1/2   0:07/8:21 (1%)
volume: 25%   repeat: off   random: off   single: off   consume: on
pi@moode-kitchen:~ $ mpc clear && mpc load Radio4 && mpc play
volume: 25%   repeat: off   random: off   single: off   consume: on
loading: Radio4
The Coasters - Yakety Yak
[playing] #1/3   0:00/1:53 (0%)
volume: 25%   repeat: off   random: off   single: off   consume: on

E.g., I'm enjoying random music but want to listen to the news via radio streaming.

I'd issue "mpc clear && mpc load Radio4 && mpc play". However, this reloads the randomness and plays it, and the radio stream is loaded to the end of the playlist.

I guess the ashuffle is set via the GUI only? I notice in snd-config.php the mpd random is set to 0

Also, I noticed that with the ashuffle random activated, a restart of the device causes music to play once rebooted, despite the "autoplay after start" being off.
Reply


Messages In This Thread
RE: One button / command to load & play random track? - by tristanc - 02-27-2019, 01:12 PM

Forum Jump: