'sendCmd('save "' + playlistname + '"')' return? (Solved)

General discussion about RuneAudio. Do not post any support or feature requests here.

'sendCmd('save "' + playlistname + '"')' return? (Solved)

Postby irishwill2008 » 30 Nov 2016, 18:14

Last edited by irishwill2008 on 12 Dec 2016, 17:51, edited 1 time in total.
irishwill2008
 
Posts: 157
Joined: 26 Jul 2016, 14:49
Location: Ireland

Re: What does 'sendCmd('save "' + playlistname + '"')' retur

Postby surfninja » 01 Dec 2016, 16:41

I don't know python but a quick google found .

you might want to check if the playlist exists before calling sendCmd to create a new list.
rAudio 1, Raspberry Pi 2B
rAudio 1, Raspberry Pi 4B
rAudio 1, Raspberry Pi Zero W
surfninja
 
Posts: 95
Joined: 13 Mar 2015, 22:06
Location: Minnesota

Re: What does 'sendCmd('save "' + playlistname + '"')' retur

Postby irishwill2008 » 01 Dec 2016, 17:02

SurfNinja, didnt think of that! What a great idea xD Will give that a shot, i could use some JS to check if it exists or not anyway ;) Great call on the file check!

I was just doing a simple fail / success check guessing the system knows it encounters the issue - failing the command but honestly dont know what it returns so..

Thanks!
irishwill2008
 
Posts: 157
Joined: 26 Jul 2016, 14:49
Location: Ireland

Re: What does 'sendCmd('save "' + playlistname + '"')' retur

Postby hondagx35 » 01 Dec 2016, 22:49

User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: What does 'sendCmd('save "' + playlistname + '"')' retur

Postby surfninja » 02 Dec 2016, 16:30

Frank, your example is very, very good. Danke! It is always good to know that how the asynchronous communications work through mpc (mpd's client) and not through the file system.
rAudio 1, Raspberry Pi 2B
rAudio 1, Raspberry Pi 4B
rAudio 1, Raspberry Pi Zero W
surfninja
 
Posts: 95
Joined: 13 Mar 2015, 22:06
Location: Minnesota

support RuneAudio Donate with PayPal


Return to General discussion

Who is online

Users browsing this forum: No registered users and 20 guests
cron