Scheduler: insert file at specific position

stoa

New member
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:
Code:
download http://localhost:9000/?pass=PASSWORD&action=inserttrack&pos=5&filename=D:\file.mp3

More about the API: http://manual.djsoft.net/radioboss/en/remote_controlapi.htm

I'd advice to avoid using that though and build events so that they do not rely on absolute track positions in the playlist.
 
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.)
 
stoa said:
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!
Yes, initially the "download" command was intended to download files. Later we have extended it to allow triggering URLs to call APIs and send events.

stoa said:
Actual use case
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.
 
Back
Top