-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use fanart.tv API to query cover/background if song has no meta-tags #50
Comments
As far as I can tell, the fanart api does not support searching and is quite basic anyways. Besides, I have no idea how we would even choose an image from a particular artist. Instead, I propose merging this issue with #56 and using musicbrains api: https://musicbrainz.org/doc/MusicBrainz_API. It could supply the album cover image (not perfect, but far better than nothing), the release date, the language, and the genre of the song, as well as tons of information for potential future use. A python wrapper for the api already exists that implements rate limiting fairly elegantly, as musicbrainz is quite strict about that: https://musicbrainz.org/doc/MusicBrainz_API/Rate_Limiting. From my initial testing, the wrapper works perfectly, and while downloading cover images is a bit slow, as it uses the internet archive, but usable for the fallback cases where this would be used. Here's a tiny example: https://gist.github.com/randompersona1/955928e3fe10d5fe420dd8ca948954b2 The hardest part would probably be finding the song in the first place, because we might need to filter strings like "(Album Version)" or "(Live Edition)" as not to confuse the search. Since their database is so comprehensive, there are also often several artists or songs with the same name (e.g. three Adele's), further complicating this. Unfortunately, I don't see any way of getting a background for a given song with any service. also refers to #20 |
Ah, this is a problem - we can't have multithreaded api requests, as that could put us over the allowed api limit. That could make the implementation tricky |
In the meantime, pretty much all songs contain metatags, so I'd say this is not worth the effort. |
Not genre though - there are currently 13000 songs without. tbf, it doesn't make sense for all of them, but a good chunk of those is just missing one. And there's ~1000 songs without a release date |
Agreed, harmonizing #GENRE by lookup (be it musicbrainz or something else) would be a great improvement (not only for those missing #GENRE, but also to verify/supplement/correct existing #GENRE tags), the same goes for the release year. |
Not sure if this is possible, but maybe fanart.tv could be queried automatically for missing cover/background artwork.
https://fanarttv.docs.apiary.io/#
The text was updated successfully, but these errors were encountered: