regosen / get_cover_art

Batch cover art downloader and embedder for audio files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request : is possible to add year, genre and label

aarkkappler opened this issue · comments

Many thanks :) for this product

Hi, I want to make sure I understand your request. Right now what we do is:

  1. get_cover_art triggers an online apple search with "[ARTIST] [ALBUM]" in the search field (e.g. "Prince 1999")
  2. Apple gives us a bunch of results, where each result contains artist name, album title, artwork URL, etc.
  3. get_cover_art filters the results for the closest acceptable match to artist and album names.

Are you asking that step 3's filter could be further refined by trying to match results against the file's year, label and genre tags?

Oh I see what you mean, that's a really cool idea. I could add cmdline options for populating more metadata, though at the moment only Genre would be straightforward to implement:

Genre

Genre would be easy

Year

Apple doesn't provide Year or Label data. Instead it provides a Copyright field like this:

  • "℗ 2015 Warner Music Spain, S.L."
  • "℗ 1972 RCA Records, a division of Sony Music Entertainment"

While I could easily parse this to extract the Year, Apple often provides a much more recent year than the original album release. (For example, searching for Lou Reed's 1972 "Transformer" came up with both of the above examples.) So I can't guarantee the year would be correct. Even if I took the minimum of all the matching years, they could all be later dates.

Label

There is no "Label" ID3 field (https://en.wikipedia.org/wiki/ID3), where would you put it instead? In the Comments field?

Tracks
Disc number

These are track-specific fields, but get_cover_art only queries and receives album information from Apple. So this would involve a lot of rewriting of the code. If you want to take that on and open a PR, I'd be happy to review it!

Unfortunately using music.apple.com's API programmatically requires a dev token, which costs money (that's why I use the itunes one instead).

I noticed that MP4 files (.m4a) don't have a PUBLISHER field. Instead, the options are here: https://mutagen.readthedocs.io/en/latest/api/mp4.html#mutagen.mp4.MP4Tags

Would you consider optionally writing ITUNESALBUMID? It'd remove the task of having to navigate Apple Music in order to obtain the album ID to enable the album to be added to Muzicbrainz.