Trying to use scheduler to insert promo elements at specific playlist positions:
Is there a way we could get a "pos=" option for the command getfile (or folder_path) - so that the loaded file isn't added at the end of the playlist, but at the defined position?
You can control the position indirectly: if you turn off the "If there are scheduled tracks, enqueue" option, the tracks will be inserted after the currently playing track.
If you absolutely need to insert something at a predefined position, this can be achieved using the API "inserttrack" command - use the "download" scheduler command to call the API. For instance, an event can run this command to insert a track into 5th position:
Ah, that's cool - I already thought about using the API, but believed I had to use something like cURL and a batch file for that. Calling the API via 'download' is a lot nicer!
(Actual use case: At around xx:55 I play a news file, clear the playlist and load a fresh m3u8 file for the next hour. On position 5 and 16 there should be promotional elements. Putting them in the playlist (at playlist generation) is the way to do that - but i only need to play the promo elements from 10:00 to 23:00. That would require 2 or 3 different playlist templates, which should be easy. But since I generate all 24 playlists for the whole day at once around midnight (via generate multiple playlists) to use the shared track separation, I can't see how to do that with different playlist templates.)
Ah, that's cool - I already thought about using the API, but believed I had to use something like cURL and a batch file for that. Calling the API via 'download' is a lot nicer!
Thank you - it is always interesting to know how the program is used, this helps to improve the software as well. I think the API approach should work for this case. Please make sure to set a strong password for the API to prevent any hacking attempts.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.