Option to "filter out" history-violating tracks when processing script lines
Posted: 30 Aug 2017 20:15
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.
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.