Thank you for your donation!


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


Load playlist at Boot
#1
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
Reply
#2
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.
----------------
Robert
Reply
#3
(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
Reply


Forum Jump: