Moode Forum
Load playlist at Boot - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9)
+--- Thread: Load playlist at Boot (/showthread.php?tid=3827)



Load playlist at Boot - FrankVer - 05-17-2021

Hi All.
I like to load a default radio playlist at boot.

So I created a script with my low level of scripting.

playlist.py

#!/usr/bin/env python

import time
import os
os.system("mpc clear")
os.system("mpc load Frank1")
os.system("mpc volume 3")
os.system("mpc play 3")



When I run this manual python /home/pi/playlist.py it does work but when I add my rc.local file
it does not work. 

Any idea how to solve this?

Rg Frank


RE: Load playlist at Boot - the_bertrum - 05-18-2021

I'd guess that your script is running before MPD is ready. There are several threads on here about ways to check if moOde is fully started before certain scripts run.


RE: Load playlist at Boot - FrankVer - 05-19-2021

(05-18-2021, 07:58 AM)the_bertrum Wrote: I'd guess that your script is running before MPD is ready.  There are several threads on here about ways to check if moOde is fully started before certain scripts run.

Thanks for your reply.

That was the solution I have to add a timer of 5-sec delay and now it's working.

Rg Frank