Play track if random jingle is played

You have a question or need an advice about how to do something? Ask it here!
Post Reply
Osric
Posts: 23
Joined: 16 Jul 2022 07:06
Play track if random jingle is played

Post by Osric »

Hi
I am trying to ensure that if a 'new music' jingle is played (line 2), the next song (after the jingle has played) is a random song selected from my 'new music library' (line 3).

However I cannot seem to figure out how to do this where the exec mode is random.
Can you advise?
Screenshot of the script I'm working with is attached.
Kind regards
Attachments
Script screen.PNG
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Play track if random jingle is played

Post by radio42 »

Your script mode is set to 'Random', i.e. the script-line to be executed is selected randomly. In this mode, it can of course not guaranteed, that after line 2 the next line will be 3.
You need to change this mode to 'Sequential', which is even the default. Only this mode ensures, that after line 2, line 3 will follow.

I also noticed, that you are using a script jingle library to randomly add jingles every so often. This might actually insert such a jingle between line 2 and 3 (which I guess is not wanted).
So I created a new v4.3.3.10.
This adds a new 'IsolateAdvertsAndJingles' script option: The script based Adverts and Jingles are not immediately checked after each line, but only if this was not a Cartwall or Advert entry resp. only at the end of a LoadPlaylist, Execute and LoadFolder block (and not after each line).
Osric
Posts: 23
Joined: 16 Jul 2022 07:06
Re: Play track if random jingle is played

Post by Osric »

Thank you for your characteristically swift and thorough reply and for the new script option, I am very grateful 🙏🏾

Post Reply