I’ll apologize in advance for so many questions. I am (or used to be) a dev. Mostly C/C++/Java, but I’m capable of throwing some crappy Python to solve a problem…
I have my library about 95% matched to releases (thanks to previous help here) with data from my local mirror of MB. The stuff that isn’t matched is mostly stuff that didn’t originate with CDs ().
I want to create smart playlists in Navidrome based on the MB community ratings that I’ll eventually add with my own values. I do not have any existing rating values in the library. It seems when I originally matched my library to MB, it didn’t pull down the community ratings for the songs. If I look at a recording using “Lookup with Browser”, I can see the ratings on each song, so I’d like to have these in the songs themselves.
If I go into the details of the song and poke about in the JSON, I don’t see the rating values. Looking at the page details in Firefox’ inspector view for an album, I can see a numeric value for the individual songs. e.g.
I have enabled ratings in the settings, but how can I retrieve these community ratings and have them write into my files? Do I need to point my Picard back at the main MB server? Do I need to use a custom script?
I don’t use MusicBee and there shouldn’t be any conflicts over the values in this field. I’m fine letting Picard overwrite whatever values are there. Does this go in the POPM frame or elsewhere?
Before I start attacking my local server with Postman and poorly written Python, I’d like to know if the experts here have suggestions.
It’s currently not possible to fetch and use the community ratings with Picard, only the personal ratings (which won’t work from a mirror). The entire rating thing needs an overhaul, though.
I see. That helps to know. I was looking at the DB schema and that’s a bit beyond my skillset. Even if Picard didn’t do it, I hoped I could use some Python queries to retrieve the ratings. I guess I can’t for now. That’s fine, I’ll look for another way to skin the cat.
What I want to eventually get to is like what YTM or Spotify have, where I can choose a song and start a new playlist/radio station from it, without having to involve LLMs or shipping data off to external processing beyond my homelab. For the short term, I’ll be happy to get a smart playlist in Navidrome of songs by genre with certain ab:mood tags with ratings > X.
Thank you for the info and all the work you’re doing here. It’s a great resource.
I’m playing with BeautifulSoup against my local server. I can scrape the pages and do some fuzzy matching and I think I can generate a batch/bash script to call eyed3 to set the values. It’s nice that the MB release pages seem to have the data needed to match the rating on the page to the file on my local machine.
Still playing with it, but I have enough of a proof of concept to try it out. I’ll post a link to a gist at some point once I have it working.
Well, I have the script working with a sample of about 20 albums. It loads pages from the local server, pulls the relevant fields out of the HTML with BS4 and builds a batch/bash file to call eyed3 to set the POPM tag. It’s not pretty by any means, but it works for the recordings for which there are ratings. There is some error handling, but I won’t say it’s robust against every possible value that people have submitted.
HOWEVER, when I upload these folders into my test instance of Navidrome, it doesn’t show them anywhere. Not on the web interface or on mobile with Substreamer or Symfonium. Well, crap. Did I do this for nothing? Am I putting this info into the wrong tag?
I guess I’ll go over to Reddit and see if the Navidrome folks have any ideas.
AFAIK Navidrome currently does not read, parse, or make use of the POPM (Popularimeter) ID3 tag. This means that any ratings or play counts stored in your audio files via POPM - for example from MusicBee, foobar2000, Mp3tag, or other tag editors like your eyed3 - are ignored during scanning. Navidrome does not import these values into its database, nor does it expose them to Subsonic‑compatible clients.
Maybe they can give you a more recent answer or any workaround.
You can also use the web service to get this information instead of scraping the HTML. This release request has the ratings set in the inc Parameter and hence gives the community ratings:
Thanks for that info. I did look at the API calls, but I didn’t see that one. I’m really not much of a REST API developer. I mostly worked in embedded firmware and compilers, but I can play about. The Python I wrote to do this flows like C++. I’m sure there’s a memory leak in it somewhere.
I’ll adjust my code to use that API call later today and test it out.
But, if what @InvisibleMan78 is saying is true, it may be a moot point. I suppose I could hack in a way to do a manual scan of the Navidrome library and force the ratings from POPM tags into its database, but it seems better if the Navidrome scanner would just do it.
Maybe they can give you a more recent answer or any workaround.
Currently the post is not replied to. But Reddit may not be the best place to discuss the topic. I have some other work today, but I’ll dig into this more over the weekend.
Even if you could do that, you would also need to modify the Navidrome web GUI (or playlist features) to display the POPM information in a useful way.
If this is important to you, maybe you could invest your coding time and provide an official Github patch?
Navidrome has a rating feature. Is it not possible to map these values onto the existing ratings? The user selection would override, obviously.
If this is important to you, maybe you could invest your coding time and provide an official Github patch?
It’s a thought. I haven’t worked in Go before, but I can see what it might take. The problem would be if my submission would be sufficient quality to pass a review. I’ll clone the repo and see what it takes to get it running in a container.
I did write a bit of Python to extract ratings from my MBZ server. This code is available on Github as search-mbz-ratings.py. It’s not great code, but it worked for my use case. If it can serve as a basis for someone else’s ideas, feel free to use it.
I spoke with Deluan on the Navidrome project and it seems they have an updated plugin system in the roadmap that will allow 2-way data syncing. Getting ratings from MB would be a good use of this system. So, I guess stay tuned.