Option to "filter out" history-violating tracks when processing script lines

You are missing a feature or need an enhancement? Post your suggestion here!
Post Reply
fredrich347
Posts: 10
Joined: 30 Aug 2017 19:38
Option to "filter out" history-violating tracks when processing script lines

Post by fredrich347 »

As far as I understand, filter and same-track history checking works differently in that a filter will work before choosing a track while history checking happens after every possible pick. We have an issue though with the 'Random' scriptline as due to it being pure random, we are seeing situations where we get unlucky and it repeatedly picks tracks that have already been attempted and failed the history check. We are getting at least one track a day that violates history rules (we use UseLastTrackOnFinalFail), even though there are tracks it could have picked but didn't (I checked the debug log).

A possible solution could be to filter out all tracks that are in the library and global history before processing, in a similar fashion to filters. This wouldn't necessarily work with "additional history" (artist checks etc.), unless it worked in that those are filtered 'on demand', i.e. it filters it from the available tracks after it is picked and found to fail the history checks but before it retries.

A note on alternatives to 'Random': LeastRecentlyPlayed would not work for me since it works in days and some libraries have few-hour rotations. LeastTimesPlayed, as far as I understand, would have a bias towards newer songs, and end up ignoring older songs which is not what I was hoping.

Maybe I'm just getting really unlucky, it is just something I have noticed a few times now and it ideally should be something that never happened. It also seems a waste to be trying to pick tracks that have already been attempted.

I am not sure if I worded this very well so let me know if something is not clear.
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Option to "filter out" history-violating tracks when processing script lines

Post by radio42 »

The LeastTimesPlayed option doesn't have a bias towards newer tracks. All tracks do have a play counter and this mode simply picks a random track of all those having the same smallest play counter value.

When using the Random mode together with the UseLastTrackOnFinalFail this means, that indeed all tracks of that media lib have been checked against the history.
As such even excluding all tracks already contained in the history prior to testing them would not help.

Have you tried the "Test" button of the script to see why all entries are violated?
Often the reason is the Album check and badly tagged meta data. Or simply reducing the history size often reveals better results.
fredrich347
Posts: 10
Joined: 30 Aug 2017 19:38
Re: Option to "filter out" history-violating tracks when processing script lines

Post by fredrich347 »

radio42 wrote: 30 Aug 2017 21:37 The LeastTimesPlayed option doesn't have a bias towards newer tracks. All tracks do have a play counter and this mode simply picks a random track of all those having the same smallest play counter value.
Yes, but newer songs will have 0 play count while older songs will have hundreds, or did I misinterpret something?
radio42 wrote: 30 Aug 2017 21:37 When using the Random mode together with the UseLastTrackOnFinalFail this means, that indeed all tracks of that media lib have been checked against the history.
Apologies, I must have misunderstood how the 'Random' scriptline worked. I thought it was pure random and gave up after a number of retries, settling on the last track that was randomly picked if UseLastTrackOnFinalFail was used.
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Option to "filter out" history-violating tracks when processing script lines

Post by radio42 »

Sure, when you are adding new tracks those are picked first.

The Random mode first picks a real Random track. If that is now violating the history, the system switches to sequential mode and validates all other tracks from that Random position.

Post Reply