openbroadcaster / observer

:radio: OBServer Automation, Scheduler, Media Library and Player Manager
https://openbroadcaster.com
150 stars 44 forks source link

Intelligent Dynamic Scheduling #68

Open alphabitnz opened 2 years ago

alphabitnz commented 2 years ago

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:

Operation:

radiorob commented 1 year ago
btelliot commented 1 year 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.

https://github.com/openbroadcaster/observer/blob/a73f3be560cd1ce9bc8ffdff7acebebecd87d046/models/playlists_model.php#L702-L950