node-raumserver icon indicating copy to clipboard operation
node-raumserver copied to clipboard

LoadPlaylist with spaces and imported playlists

Open davie2000 opened this issue 7 years ago • 12 comments

I have installed node-raumserver on my Ubuntu-14-Server and it works at a glance! Thanks for that piece of software!!!

Loading a Raumfeld-Playlist named "BestOf" is easy: http://192.168.xxx.xxx:8080/raumserver/controller/loadPlaylist?value=BestOf

But what to do when the name is "Best of" (with space between)? Quoting the value with " does not work.

And how is it working with "imported playlists" e.g. named "1-4_ALLES.m3u"? These are part of my music stored on my NAS imported into Raumfelds music library.

Thank you very much for your reply!

Background is that I want to use Siri to control my raumfeld device. Simple commands like "Hey Sir, next" or "pause" are already working.

davie2000 avatar Dec 11 '18 21:12 davie2000

Try ?value=Best%20Of For zones with spaces it works that way.

gahujipo avatar Dec 11 '18 21:12 gahujipo

As gahujipo mentioned you should use %20 for spaces (Url encode) This should work!

ChriD avatar Dec 12 '18 10:12 ChriD

oops I could have come to that by myself, sorry. Thanks for your fast answers!

And what about the "imported playlists"? Is there a way to start them via raumserver? TiA

davie2000 avatar Dec 12 '18 20:12 davie2000

i think it should be possible. You may have to use "loadContainer" request with the correct containerId (in fact loadPlaylist is only a loadContainer with a specific container id) so for the Imported Playlist the container Id is 0/Playlists/Imported/ --> 0%2FPlaylists%2FImported%2 That means a request for loading an imported playlist may look like this: loadContainer?id=0%2FPlaylists%2FImported%2PlaylistName

I didnt have tested it. It may be that you have to keep the slashes like so: loadContainer?id=0/Playlists/Imported/My%20Playlist

ChriD avatar Dec 12 '18 21:12 ChriD

Thanks again for the fast reply!

I tried both: 192.168.xxx.xxx:8080/raumserver/controller/loadContainer?id=0%2FPlaylists%2FImported%2F2_EINZELTITEL.m3u and 192.168.xxx.xxx:8080/raumserver/controller/loadContainer?id=0/Playlists/Imported/2_EINZELTITEL.m3u and all leads to error

errorMessage | "Error: VirtualMediaRenderer for id '0/Playlists/Imported/2_EINZELTITEL.m3u' not found"
errorData | null

I have loaded the playlist 2_EINZELTITEL with the app and checked (with getRendererState) that the "cid" in the "AVTransportURI" was named like "0%2FPlaylists%2FImported%2F2_EINZELTITEL.m3u". Also tried without ".m3u".

davie2000 avatar Dec 12 '18 22:12 davie2000

Jea sorry, It should be something like loadContainer?id=Schlafzimmer&value=0/Playlist.... In fact the same structure as loadPlaylist

ChriD avatar Dec 13 '18 08:12 ChriD

Yuhuuuu ... it works! Thank you very much for your help and the great software!

One other question: is it possible with raumserver to add the currently playing (local) song to a defined playlist? In raumkernel i found a method 'addItemToPlaylist' (in "lib.queueController.zonePlaylist.js"), but I can't find anything similar in "node-raumserver/lib/requestHandlers/". Background: I want to add songs (actually playing) to a playlist "like" or "dont_like" with an URL (which could later be called directly from Siri)

davie2000 avatar Dec 13 '18 17:12 davie2000

Different topic but @davie2000 would you elaborate on the Siri - Raumfeld Integration?

davidspr avatar Dec 13 '18 21:12 davidspr

As I am just beginning to try it out I can only give you a short "manual": You need the app "Kurzbefehle" (shortcuts) from the app store. There you can cobble together "URL" (=your desired raumserver-action) and "get content from URL". Then you can give this shortcut a name and a you can record a "Siri phrase" to activate it. Then you can say "Hey Siri, play" and your iPhone calls the raumserver-command "play".

You can do so for every URL-command. Actually I am trying to get Siri to listen to "Hey Siri, load 'individual playlist'" without having a single shortcut for every known playlist. Altough this is cool already.

davie2000 avatar Dec 13 '18 22:12 davie2000

One other question: is it possible with raumserver to add the currently playing (local) song to a defined playlist?

Nope, currently not. The kernel does have the ability to update playlists (add/delete and move items ) but there are no requests for that. It should be possible to create such a request you want, but i cant promise you that i have time to do that :-)

ChriD avatar Dec 14 '18 08:12 ChriD

Ok, thx4info! I would be glad if you find time for that feature. But as I want to take a look at myself, I would appreciate if you could answer some questions I surely will have then ;-)

davie2000 avatar Dec 14 '18 21:12 davie2000

Different topic but @davie2000 would you elaborate on the Siri - Raumfeld Integration?

Here is more info: Raumfeld mit Siri steuern - Anleitung

davie2000 avatar Dec 17 '18 19:12 davie2000