Add Recently Played plugin provider#3831
Conversation
🔒 Dependency Security Report✅ No dependency changes detected in this PR. |
7b7d21e to
a66cb02
Compare
a66cb02 to
6703e2d
Compare
|
Some nice ideas in here, thanks for putting it together. I think at the outset the radio station recently played row part of this PR should be on its own and the other rows can be discussed separately. Then, the radio station part could be done by identifying when an ICY title changes during a radio item, resolve it and write a playlog entry for the resolved track — then the existing Note that the resolution of the "Artist - Track" info is being done similarly but in a more robust way in my last.fm recommendations provider. You could look at that for some inspiration and there is an argument to be made that this functionality could be split out in future into helpers so many providers could use it. #3020 |
|
Thanks for the feedback and the pointer to #3020 — very helpful context. After thinking it through, I agree the ICY resolution doesn't belong in a plugin. Here's what I'm proposing instead: Core change in For the resolution logic I'm planning to extract it as a standalone helper function Two questions before I open the separate PR:
The |
|
Before you continue on I would see what @MarvinSchenkel thinks. The concept of logging the radio tracks as played is similar to this discussion. https://github.com/orgs/music-assistant/discussions/4616 The key issue is that it will have side-effects on play_count / last_played stats for in-library tracks. It means radio will silently influence "Forgotten Tracks", "Most Played", and the personalized rows in my last.fm recommendation provider (for example) — songs the user never chose to listen to will start ranking. |
|
The scope of this PR has been narrowed to ICY radio tracking only. The library-based recommendation folders that were originally part of this PR (Forgotten Tracks/Albums/Artists, Most Played, Never/Rarely Played, Recently Favorited, Recently Added, Random Artists/Albums) have been split out into a dedicated plugin: #3890 – Add Recommendations plugin provider. This keeps each PR focused and makes reviewing easier. |
|
@dmoo500 Coming back to this — when we discussed two weeks ago you mentioned extracting Separately, I've got some reservations about the separate JSON file for history — it sits outside MA's existing storage (cache / playlog). Feels like a symptom of the unresolved question about how radio plays should integrate with the playlog without poisoning the stats? Also I think there will be problems with the radio providers that cycle the artist name with the upcoming tracks like Radio Paradise and Mother Earth. As far as I can tell lookups would be triggered for this? Thoughts? |
|
Thanks for the detailed feedback. The current changes in this PR are limited to the split: the library-based recommendation folders have been moved to a dedicated plugin (#3890), so this PR stays focused on ICY radio tracking only. The main reason it's still a draft — I haven't yet fully resolved the open questions you raised. That said, I want to address the JSON history point: keeping the ICY history outside the playlog is actually intentional. This plugin is an alternative for users who don't run a scrobbling provider (Last.fm etc.) — similar to what you described in #4616. Once a scrobbling plugin covers radio streams properly, this plugin becomes redundant for those users. Integrating into the playlog would cause exactly the stats poisoning you mentioned (play_count / last_played influenced by radio), which is why the separate file made sense to me. For the resolver and the Radio Paradise concern: fair points, and I'll revisit those once #3020 is merged. |
Recently Played Plugin Provider
A new
PluginProviderthat tracks songs heard on radio streams via ICY metadata and surfaces them as a "Recently Played on Radio Station" recommendation folder on the home screen.How ICY tracking works
QUEUE_UPDATEDeventsmass.music.search()(library-first, then all providers) to a real track URIProvider settings
Screenshot
Recently Played on Radio Station