I have already asked regarding this in this thread, but I guess I may get answers more quickly If I post a new question regarding the API command line part only.
So my question is, how do I specify a command line for Volumio’s API to start playing a specified folder from my NAS (SMB) shares. (The folder is already given to the Music Library->NAS section in Volumio). (So I can add it to my triggerhappy configuration to use it with a remote). Could someone give an example API command line for this? I could not figure it out from the Volumio Wiki’s API description, as it far too complicated.
I overviewed the other threads here in the API section and find some clues, but still just clues, because all the other threads were about webradios. So what if I specify this:
So will this work? Or do I need som other command instead of “curl”? Or I must also add a track title for the “title” and the “uri” section as well? even if it would be the first track in that folder, won’t it just play that simple track and than stop the playback? Because I want to playback the whole folder this way, like when I click on the “Play button” on the left side of the folder’s name in the WEB UI in the Music Library->NAS browser.
For clues - when you select and have this folder playing, look at your <volumio-ip>/dev page and see what the correct uri and path attributes need to be!
This path I have entered is an example. But of course the path I enter is correct. But one thing: I can not enter accented letters while editing the triggerhapy config file trough SSH: “Én Zenéim” would convert to: " ^ n Zen ^ im" when entered in the command list. What to do whit this?
Are you sure – isn’t there a folder view in one of the menus?
Or does it only let you browse files, and then let you add each track from a folder manually?
There’s a Folder view from Music Library NAS->My Share → here it lists all the folders the main Shared Folder has and I can play the entire folder by clicking the play icon in the left corner of the Folder’s name. As I wrote this is already form the Music Library section, so I have all these Folders and files scanned in already.
yes I know, and it will built a complete queue list for that folder. But I don’t see this function in the API’s.
I can see play an Item (single track) or a list, but that is what you have to pass as parameter
Unfortunately, there isn’t much documentation for these parts.
Your best bet is to open up the log on ssh, click on the UI and see what commands are being called.
i got from rest api :
radio: play station / addtoqueue
playlist: playplaylist
youtube: song / channel / playlist / addtoqueue of all
mixcloud: song / addtoqueue
soundcloud: song / addtoqueue
seek0 / prev / stop / play / next / vol +5 / vol -5
Volumio uses Explode in the background to harvest the folder and make it available to mpd. This function is not available through the API’s.
You can create a bypass, creating a playlist and load that by API, but that is a bit cumber sum to accomplish.
info: CorePlayQueue::clearPlayQueue
info: CorePlayQueue::saveQueue
info: CoreCommandRouter::volumioPushState
info: CoreCommandRouter::volumioPushQueue
info: CoreStateMachine::addQueueItems
info: CorePlayQueue::addQueueItems
info: Adding Item to queue: music-library/NAS/QNAP/Morgan Wade
info: Exploding uri music-library/NAS/QNAP/Morgan Wade in service mpd
info:
---------------------------- MPD announces state update: player
info: ALBUMART /albumart?cacheid=487&web=Morgan%20Wade/Reckless/mega&path=%2Fmnt%2FNAS%2FQNAP%2FMorgan%20Wade%2F(2021)%20-%20Reckless%2F0101%20-%20Morgan%20Wade%20-%20Wilder%20Days.flac&metadata=false
info: URI /mnt/NAS/QNAP/Morgan Wade/(2021) - Reckless/0101 - Morgan Wade - Wilder Days.flac
info: ALBUMART /albumart?cacheid=487&web=Morgan%20Wade/Reckless/mega&path=%2Fmnt%2FNAS%2FQNAP%2FMorgan%20Wade%2F(2021)%20-%20Reckless%2F0102%20-%20Morgan%20Wade%20-%20Matches%20and%20Metaphors.flac&metadata=false
info: URI /mnt/NAS/QNAP/Morgan Wade/(2021) - Reckless/0102 - Morgan Wade - Matches and Metaphors.flac
info: ALBUMART /albumart?cacheid=487&web=Morgan%20Wade/Reckless/mega&path=%2Fmnt%2FNAS%2FQNAP%2FMorgan%20Wade%2F(2021)%20-%20Reckless%2F0103%20-%20Morgan%20Wade%20-%20Other%20Side.flac&metadata=false
info: URI /mnt/NAS/QNAP/Morgan Wade/(2021) - Reckless/0103 - Morgan Wade - Other Side.flac
info: ALBUMART /albumart?cacheid=487&web=Morgan%20Wade/Reckless/mega&path=%2Fmnt%2FNAS%2FQNAP%2FMorgan%20Wade%2F(2021)%20-%20Reckless%2F0104%20-%20Morgan%20Wade%20-%20Don't%20Cry.flac&metadata=false
info: URI /mnt/NAS/QNAP/Morgan Wade/(2021) - Reckless/0104 - Morgan Wade - Don't Cry.flac
info: ALBUMART /albumart?cacheid=487&web=Morgan%20Wade/Reckless/mega&path=%2Fmnt%2FNAS%2FQNAP%2FMorgan%20Wade%2F(2021)%20-%20Reckless%2F0105%20-%20Morgan%20Wade%20-%20Mend.flac&metadata=false
info: URI /mnt/NAS/QNAP/Morgan Wade/(2021) - Reckless/0105 - Morgan Wade - Mend.flac
info: ALBUMART /albumart?cacheid=487&web=Morgan%20Wade/Reckless/mega&path=%2Fmnt%2FNAS%2FQNAP%2FMorgan%20Wade%2F(2021)%20-%20Reckless%2F0106%20-%20Morgan%20Wade%20-%20Last%20Cigarette.flac&metadata=false
info: URI /mnt/NAS/QNAP/Morgan Wade/(2021) - Reckless/0106 - Morgan Wade - Last Cigarette.flac
info: ALBUMART /albumart?cacheid=487&web=Morgan%20Wade/Reckless/mega&path=%2Fmnt%2FNAS%2FQNAP%2FMorgan%20Wade%2F(2021)%20-%20Reckless%2F0107%20-%20Morgan%20Wade%20-%20Take%20Me%20Away.flac&metadata=false
info: URI /mnt/NAS/QNAP/Morgan Wade/(2021) - Reckless/0107 - Morgan Wade - Take Me Away.flac
info: ALBUMART /albumart?cacheid=487&web=Morgan%20Wade/Reckless/mega&path=%2Fmnt%2FNAS%2FQNAP%2FMorgan%20Wade%2F(2021)%20-%20Reckless%2F0108%20-%20Morgan%20Wade%20-%20Reckless.flac&metadata=false
info: URI /mnt/NAS/QNAP/Morgan Wade/(2021) - Reckless/0108 - Morgan Wade - Reckless.flac
info: ALBUMART /albumart?cacheid=487&web=Morgan%20Wade/Reckless/mega&path=%2Fmnt%2FNAS%2FQNAP%2FMorgan%20Wade%2F(2021)%20-%20Reckless%2F0109%20-%20Morgan%20Wade%20-%20Northern%20Air.flac&metadata=false
info: URI /mnt/NAS/QNAP/Morgan Wade/(2021) - Reckless/0109 - Morgan Wade - Northern Air.flac
info: ALBUMART /albumart?cacheid=487&web=Morgan%20Wade/Reckless/mega&path=%2Fmnt%2FNAS%2FQNAP%2FMorgan%20Wade%2F(2021)%20-%20Reckless%2F0110%20-%20Morgan%20Wade%20-%20Met%20You.flac&metadata=false
info: URI /mnt/NAS/QNAP/Morgan Wade/(2021) - Reckless/0110 - Morgan Wade - Met You.flac
Seems possible, to add the complete folder.
I believe there was a plugin tpo play the last played song, so if you set the list to random, you might even not to program anything.