Similar to adding other non-media based widgets, you can call the following:
POST /api/playlist/widget/{widgetType}/{playlistId}
ie if you want to add subplaylist widget then call:
POST /api/playlist/widget/subplaylist/{playlistId}
Then you will need to edit it with:
EDIT /api/playlist/widget/{widgetId}
passing at least subPlaylistId int array, in Postman it would look something like this:
The spots, remainder (drop, repeat, none) and arrangement (even, roundrobin, none) are all optional settings - we will make sure to better show that in the API documentation with the next release.
@Peter
I am trying to make a call to add a playlist to a subplaylist widget but not quite getting it to work correctly and not sure what I’m missing. I get a response of:
“message”: “Please select at least 1 Playlist to embed”
“property”: “subPlaylistId”
Gah,
Thanks I got that working.
How can I specify multiples in the array? (Not sure on the syntax needed)
subPlaylistId[]=123,124
doesn’t seem to add another row in the subplaylist as I would expect.
Sorry to keep this alive…
I am getting a new error when trying to add playlists into the subplaylist and the error doesnt seem to have enough information.
“Cannot add the same SubPlaylist twice.”
But the IDs I am adding are different. I noticed the same error in the UI though too. So I am sure I’m missing something simple…
I tried testing it a bit more, and it errors on 2 different playlists with that error while i can add others without issue. (including the one that was indeed added first.)
The reasoning behind trying to structure this way is for the reusability and how we have have images grouped together. I hope that makes sense… If there is another way to accomplish this please let me know. Thank you.
Having Playlists on Playlists is fine and is how we hope you’ll use the system - the only thing you can’t do is have the same Playlist again in the chain. If you remove that link you’ll be fine.
So you can’t have:
A -> B -> C -> B -> D
Because when we try to join them together, B has C on it, which has B on it, which has C on it, which has B on it, etc - i.e. an endless loop.
OK sure - I double checked the error message and I think it can only happen when there is a loop like that. It isn’t too easy to spot sometimes as you have to go through each Sub-Playlist Widget.
I took another look and don’t seem to have any loops happening.
I ran a troubleshoot session and here were the errors i got but im not certain what exactly i did:
Yes sorry, this is what I can see in the log when the error happens. (I was able to recreate it in the UI)
I followed the “Troubleshoot” to turn debugging on and then recreate the error and download the zip file and this is what I pulled from there as well as the “Logs” tab. I didn’t try switching the CMS to Test mode tho. Not sure if that gives more information or not.
It does seem like it doesn’t like specific playlists but they have nothing in common so that part confused me a bit.
I think that i’ll need to see what you’ve got to diagnose whats happening - its very hard to tell from the description/error messages. Do you have a link you can share?
It is suggesting that there is a loop - Playlist with the ID 147 appears twice in the Widgets for Playlist with the ID 162.
New to XIBO with a basic question on this topic. I have a layout with a default full screen region (1080p). I’d like to link a playlist to this layout/region.
From this thread, the first action is to add the subplaylist widget using the following:
POST /api/playlist/widget/subplaylist/{playlistId}
For this request, what is the value to used for the playlistID? Is there a default playlistid created in region 0 of the layout that should be used? Would I need to search the layouts (e.g. by layout name) to find the current value of the playlistID for region 0 before the request to add the subplsylist widget?