Open alphabitnz opened 2 years ago
Could the resolve function of the playlists_module.php be modified so that it checks the overall playlist for duplicate media items on resolve?
For each item in the $result array, add a variable to show if the item was manually put there, if its a station id, or if its from a dynamic selection.
Example $result array: [Media ID, TYPE] [127, SYSTEM] [124, MANUAL] [144, DYNAMIC] [144, DYNAMIC] [169, DYNAMIC]
Then when resolving the $result array at the end, purge duplicates. Or replace it with a song that's not in the playlist.
[Media ID, TYPE]
[127, SYSTEM]
[124, MANUAL]
[144, DYNAMIC]
[144, DYNAMIC]
[169, DYNAMIC]
This would at least prevent the same song from getting added to a playlist twice from dynamic selections.
Currently, Dynamic Selections are unaware which media has already played prior to their own instance in a playlist.
Some use cases where this is not ideal would be:
My concept to solve this problem would be to develop 'Intelligent Dynamic Scheduling', addressing not only the above issues but also introducing the ability to set some Rotation
A draft formula to populate a Dynamic Selection from eligible media would be:
[item selection score] = [rotation weight] - [match result] + [popularity score]
Terms:
**if** [same item found] **or** [same title found] **or** [same artist found] **or** [specific Regular Expression found in <field>] **then** [match result] = 1 **else** [match result] = 0
[popularity score] = (([count item votes] + [sum all votes]) / [sum all votes]) / 2
Operation: