Add album_artist, year, rating, file_path column to data layer across all providers#306
Add album_artist, year, rating, file_path column to data layer across all providers#306rendyhd wants to merge 18 commits intoNeptuneHub:mainfrom
Conversation
Capture the original album artist before _select_best_artist() overwrites it with the track-level artist. This preserves the album-level artist (e.g. for compilation albums) in a new `album_artist` column in the score table, propagated through all media server modules (Jellyfin, Emby, Navidrome, Lyrion, MPD), the analysis pipeline, similarity search, song alchemy, path manager, and API responses. Also fix a pre-existing bug in Emby's standalone track path where _select_best_artist() return tuple was not unpacked. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Start collecting additional information could be useful as a basis of future functionality. Did you have something in mind? About mediaserver to test, just one correction, you need to integrate only Jellyfin, Emby, Navidrome, Lyrion. IMPORTANT: Navidrome is the configuration for all the Music Server that support the Open Subsonic standard. Ok maybe cover all is not always possible (someone have some small difference) but I usually tested this kind of change on Navidrome AND Lightweight Music Server For MPD I tried add integration but I was never able to complete basically because I wasn't able to directly download song from MPD for the analysis (maybe if you have any idea integrate MPD or other Music Server in future could be nice). So you can skip it because is incomplete. |
|
My goal is to make a Curated Playlist Builder, this would be great metadata to have in there. I was thinking, when you have local filepath you can:
Regarding Album, there's two paths I think:
The expand album is very much in line for what I want with the second part of my Playlist system - the Expand playlist. You basically expand from N tracks, taking not just the last song as data-point but the group. This would be the same for playlist and album expansion. Similar album is a different approach, matches groups with groups. I wonder how much that would get used. It'd say it's fun from an exploration perspective if you have a large library, but not the best way to stay in a certain mood. |
|
Local file path need to be think carefully:
On this last point it could be nice the idea of a .m3u output for music server that support it. So you don't have to use API at all (and you don't have to match a file path with the ID of the music server). It maybe could be impelmented as a "local-path" music server. The result should be you analyze locally, your output is local file, and then you can import where you want. |
Two Docker Compose files for end-to-end testing of the album_artist column across all providers (Jellyfin, Emby, Navidrome, Lyrion — MPD excluded): - Providers stack with shared test_music mount - Per-provider NVIDIA AudioMuse instances with isolated Redis/Postgres - Bash validation script that queries each Postgres for album_artist data - Step-by-step test guide covering provider setup, API keys, and checklist https://claude.ai/code/session_01AU49aWqCYybatiX1yhK6UD
Build the image from the repo Dockerfile with the nvidia/cuda base instead of pulling from the registry. The flask-jellyfin service owns the build; all other services reuse audiomuse-ai:test-nvidia with pull_policy: never. https://claude.ai/code/session_01AU49aWqCYybatiX1yhK6UD
Replaces named Docker volumes with host bind mounts so provider
config and data persist in testing/providers/{jellyfin,emby,
navidrome,lyrion}/. Added testing/.gitignore to exclude the
providers/ directory and .env.test from version control.
https://claude.ai/code/session_01AU49aWqCYybatiX1yhK6UD
|
Successfully tested. I'm going to look into the other metadata fields before pushing the PR.
|
|
I've added and tested the following fields:
*Navidrome by defaults reports an "Internal path", this is artist/album/track but not your real file path. If you want to match files across services, it's advised to turn on Report Real Path:
You can also change this as a default setting by setting ND_DEFAULTREPORTREALPATH=true |
…emain consistent between version (and not having to re-enable settings)
…dyhd/AudioMuse-AI into feature/album-artist-support
|
Thanks for you effort, to recap you added this 4 field all in the score table:
And for now you use only album artist as as fallback when album is not present in the difference "song search" form? All the other field are only for future implementation right? In your test, on all the mediaserver, did you try:
I'll do my test offcourse, but editing the mediaserver part we need extra attention. |
|
@rendyhd This is great. Having the ids along with the ratings is huge.... |
In your test, on all the mediaserver, did you try:
During my test just now I did find out that album name isn't populated for Navidrome and Lyrion - I haven't seen anything that could cause that regression. I can test tomorrow with the current release |
…r Lyrion and Navidrome
|
Check after last commit, album name is complete now too (rating is just a single song, so 0.3% is correct):
|
There was a problem hiding this comment.
You added here in the prompt that you have Year and Rating but some line over you have a contradictionary line that say:
The database has NO YEAR COLUMN
The result is that a query like
Give me all the song of year 2025
even with gemini-2.5-flash that is fast enough, don't read the year from the database.
Please refactor ALL the prompt to use this new data and have it prefear from the "AI BRAINSTORMING" tool.
There was a problem hiding this comment.
Thanks! My focus was completely on the data schema, I remember removing it there. Completely missed it above. I'd be happy to spend some time on looking at the complete prompt. I can make a similar test script and iterate through variations and document performance across models.
Have you every looked at using it for specific song suggestions? I know that plexamp used that approach.
Also just thought of the idea that I'd like a killer-prompt that's gonna suggest me new albums
There was a problem hiding this comment.
If you can improve the AI prompt by doing multiple test will be really appreciated. I have the impression that we are not using the Instant Playlist potentiality at all.
I think that the key idea is not using the AI to have the information, but to help you searching between the information that you already have in your database (so searching in the database, or running API, and so on).
|
So I review the change in the code and testead against Navidrome. In a legacy DB the new column seems added correctly with defaul null:
Then I run a new analysis with number of album default to 0 (so all) actually add:
Then I went on chat functionality try to use the year that could be interesting, and there was no way to force the chat to use it at least with Gemini. Probably it could be the same also on Artist Album and Rating . Can you improve the prompt to enanche the use of this data? are there any other functionality where this data can be useful? Path I suppose was added for future implementation right? I still need to test:
|
|
Can you improve the prompt to enhance the use of this data? - YES, having some ideas but let me get iterative test going Path I suppose was added for future implementation right? - It was needed for #311, here there's support for local files and multi-provider support. Multi-provider linking happens based on file path. That means you can have 1 AudioMuse instance for multi providers without having to re-run the analysis. |
Capture the original album artist before _select_best_artist() overwrites it with the track-level artist. This preserves the album-level artist (e.g. for compilation albums) in a new
album_artistcolumn in the score table, propagated through all media server modules (Jellyfin, Emby, Navidrome, Lyrion), the analysis pipeline, similarity search, song alchemy, path manager, and API responses.Also fix a pre-existing bug in Emby's standalone track path where _select_best_artist() return tuple was not unpacked.
Also adds:
Year
Track Rating (for Navidrome and Lyrion)
File Path (note on Navidrome)*
Updated chat (instant playlist) with info in year and rating
*Navidrome by defaults reports an "Internal path", this is artist/album/track but not your real file path. If you want to match files across services, it's advised to turn on Report Real Path:
You can also change this as a default setting by setting ND_DEFAULTREPORTREALPATH=true