Smartblock improvements

Following smartblocks improvements could interess many users, could they be added to LT roadmap :

  • Jingle track type : could be added automaticaly and randomnly to a smartblock, after a parameterized time without other jingle broadcasted.
  • Smartblocks generated by some genres ponderation (e.g. 60% Rock, 30% Pop, 10% Jazz).
  • Permit combinations like “genre is not Jazz and genre is not Rock”, which is now saved as “genre is not Jazz or genre is not rock”

Many thanks

1 Like

Ok, so I’ll respond to these ideas, I appreciate the feedback.

For the first one, this is implementable via a combination of smartblocks in a playlist - create a smartbock that is limited to a # of items or time that match whatever you want for the content then add another smartblock limited to the time or # of jingles you want to play defined by metadata for instance with the Genre: jingle and then you can repeat this playlist via the autoloading feature. I think one limitation I’m realizing is that it will as things are currently defined it will overflow with the repeat until full autoloading feature. So any testing and/or feedback on how this can be improved would make sense.

I’m hesitant to create a hardcoded “jingle” implementation because this would alter the relative flexibility of the way things can be done currently. But on the otherhand I think it would be useful for more documentation and examples. I’m currently planning a number of screencast tutorials that will walk people through the setup of somewhat complex adverts, jingles, station IDs etc using smartblocks and autoloading playlists.

The percentage based smartblock is trickier because since the track selection is random there isn’t a straightforward way to implement this. We could for instance introduce weighting so that you could make a Rock track twice as likely to be selected than a pop track and 6 times more likely to be selected than a jazz track but this wouldn’t necessarily translate into a even distribution of tracks on a regular basis. You could even do something like this by saying select 6 rock tracks, select 3 pop tracks and select 1 jazz track, but without an additional shuffling (which isn’t currently programmed) this isn’t going to be random. In addition if you did make it likely to select a track by random percentage vs. weight it would not necessarily distribute the tracks evently based upon length. For instance Jazz could be a lot more than 10% if your Jazz tracks were all a lot longer than the other tracks. It’s an interesting idea but I’d need to see more about it.

Also the last one you mentioned is now possible with a recent PR. Basically if you click the Add modifer and select genre again it will be added as an AND thus avoiding the issue. Unfortunately the underlying javascript code is still a mess and thus we still have a bug where if you delete criteria or modifiers the code will merge everything back into a messy OR for similar criteria. But as a workaround just don’t delete any criteria while you are creating a smartblock you should be able to accomplish this.

Hope this is helpful. Please share any questions/feedback you might have.

Many thanks for your replies.

  • For jingles, I’ll try your idea of a combination of smartblocks in a playlist. Thus, hardcoded jingle implementation should not really useful, but improving documentation or/and tutorials would be appreciated by airtime/libretime newbies (as I said in another post, I didn’t know that a playlist can include smartblocks, and I don’t see this feature describe in documentation).
  • The genre ponderation in smartblocks is not an important feature for me, and should be approached by some combination of smartblocks in a playlist, it should be sufficient.
  • For “genre is not xxx and genre is not yyy”, what do you call a “PR” ? Is it a pre-release ? How could this “PR” be installed : git clone + install script ? With release 3.0.0-alpha.6, Add modifier + select genre again adds a OR and not a AND condition, I don’t see what to do.

Yeah I’m actually working on revamping the documentation right now as a whole project. I will be creating screen cast tutorials, step by step how to guides and putting in edits of the existing docs.

Basically the latest git master has it. Hopefully we can get out a new release soon.

And to answer what a PR is, it is a" pull request", it could be thought of as a pre-release but basically its a section of code that has been tested and added to the latest cutting edge version of the software. We strive to not break anything with any PRs. PRs are used by github and basically say hey I have this code that I want to add to the project.