LeastRecentlyPlayed Script Function

You are missing a feature or need an enhancement? Post your suggestion here!
Post Reply
Posts: 76
Joined: 12 Dec 2013 18:42
LeastRecentlyPlayed Script Function

Post by inl_inc »

I haven't been using the LeastRecentlyPlayed script function mainly because the most likely outcome is a playlist that just repeats itself. However, I find that using only the Random function sometimes produces outcomes that I am not happy with (such as selecting tracks that also happened to be played next to each other several days ago).

While I understand that random outcomes do mean that situation like exact same tracks being picked back to back multiple times is in the realm of possibility I would love to have the ability to adjust the probability weights of the LeastRecentlyPlayed function. Instead of having 100% chance of the script picking the LeastRecentlyPlayed track, I would like to have the ability to define a range for the LeastRecentlyPlayed track. For example, narrow the data set to 20% of least recently played tracks (or 30%, 50%, etc) that fit existing filter criteria and randomly select a track from that subset.

I'm not sure if that's something that can be easily implemented given the constraints of the current scripting logic. And I'm totally open to your workaround suggestions. I basically want to prevent same songs from being cued in the same sequence (as much as possible) as they were previously played. My music library is definitely large enough to make this work (that's why I find it odd when same sequences are occasionally repeated).

I currently only use global history and do not set any restrictions on the individual libraries. Just as an example, let's say I have 3 libraries: new music (small size, high intended rotation), current (the bulk of the library, and fills most of the hour), gold (large size, fills small portion of the hour). The gold library is the problem - where some tracks are not played for 180 days, while another track would be picked that played 2 days ago. I was thinking of maybe trying to change the History value of the gold library to try to achieve the same outcome. For example, if I want a track to be picked from the 33% of least recently played tracks (given a library size of 300), would setting individual library History to 200 achieve the result I am looking for?
User avatar
Site Admin
Posts: 6539
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Re: LeastRecentlyPlayed Script Function

Post by radio42 »

Yes that is exactly what the media lib history is used for. So in case you define a media lib history you can then simply use the regular Random mode.

Another even more simple option is to use different script-line modes, e.g. to mix the regular 'Random' mode with the 'LeastRecentlyPlayed' mode.
That way you automatically shuffle the last recently played tracks and prevent playing the same tracks in a loop ;-)

Post Reply