How to avoid 2 tracks of the same artist?

Hey everybody , thanks for the great work , Libretime is the perfect radio automation that my team and me were looking for to start our radio project.

We have one issue that we can’t solve , we often have two songs from the same artist (not the same song) playing one after another OR playing a few minutes later. We’d like to avoid that . We’re using smartblocks of 4 tracks.

Any idea how to avoid that?



Hmm that isn’t currently a feature of the way the algorithm is written, its pretty much random and can be tweaked to avoid tracks but not artists. This would require rewritten the smart block to take something like this into consideration.

Wouldn’t it be possible to add a criteria to Smart-Blocks like :

Creator is “Last Played” before “X” hours

That’s like adding one criteria inside another one.

So the issue here is there isn’t any data structure that ties all of the tracks together with Last Played. Last Played is a timestamp on the track itself, so I’m not sure the best way to accomplish something like this or if it would be a high priority but it wouldn’t work like that with the current way that Smart Blocks are programmed.

Incase someone wants to try. You would need to code a new option field in Smart Blocks to set a time. Then tap in into ‘cc_playout_history’ for doing the filtering. There you can retrieve the file’s info by using ‘file_id’ with cc_files (to get creator) and then use ‘starts’ in playout history to compare with current server time depending the hour chosen in that option. So then you will just have to filter it out by finding if that creator was played within that hour.

Once I get back to LT, I’ll look into it if nobody has done it yet.


I second that request. I only use smart blocks to play my music but get lot’s of repeated artists within a block. If that could be avoided, that would definitely be a plus. At least as an option it would be desirable.

Our radio programmers keep asking for this one and would very much appreciate it! There’s a lot more they keep asking for haha especially super complicated ad scheduling… though I feel like the people who book the ads just want to disenfranchise use who aren’t on RCS’ products…

Well yeah, we should plan out how we’d like to do more complicated scheduling and figure out a good workflow/UI to make it happen. I know that RadioLogik has better support for ad campaigns etc. This could be a game changer for LibreTime but it also would be a lot of work to implement. As of right now we have no monetization/incentive to push people to really dedicate their time to development. So mostly just getting the scratch an itch type of bug fixes.

So @robbt, are you implying that a temp solution could be what @codenift is suggesting??
I agree with your point that it could be great to plan a “more complicated scheduling tool”, but given the reduced resources available makes it hard to accomplish.
My question is if a simpler/temporary fix would make any sense to try?

It’s possible that this might work but it will require analyzing the database and testing it along with modifying the smartblock form and code to implement it. I haven’t been focused on LibreTime much recently so I can’t say off the top of my head.

It would be great to focus on this one (checking the artist’s last ocurrence) for the time being and leave other parameters for a later task. This one seems to be a frecuent need of radio stations that work closely with record labels (which get upset if an artist of other label gets more plays than theirs :slight_smile:

I can volunteer to help someone more experienced in LT coding if that’s of any help.
Let me know, cheers!