regosen / get_cover_art

Batch cover art downloader and embedder for audio files
MIT License
69 stars 8 forks source link

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

Open aarkkappler opened 3 years ago

aarkkappler commented 3 years ago

Many thanks :) for this product

regosen commented 3 years ago

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?

aarkkappler commented 3 years ago

Helo Regosen and thank you for you reply,

in fact I just suggest to extend your solution to get more metadata than the artwork, it could be possible to get 

1 - Artwork 2- Genre 3 - Year 4 - Tracks 5 - Dicnumber 6 - Label

this is what I am suggesting

Regards,‌  

De : "Rego Sen" A : "regosen/get_cover_art" ,"aarkkappler" ,"Author" Envoyé: jeudi 22 Juillet 2021 23:08 Objet : Re: [regosen/get_cover_art] Feature request : is possible to add year, genre and label (#14)  

 

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

get_cover_art triggers an online apple search with "[ARTIST] [ALBUM]" in the search field (e.g. "Prince 1999")
Apple gives us a bunch of results, where each result contains artist name, album title, artwork URL, etc.
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 against year, label and genre?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

regosen commented 3 years ago

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:

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!

aarkkappler commented 3 years ago

Hello Regosen, I hope you are doing well

you are a very nice Guy, I am very happy about your answer, I am fighting with 49000 songs, and Musicbrainz and Discogs are Toooooo Old, what I can see it that I have a lot of errors with identifiers, ISRC, AcousticID, etc. this is the reason I am doing the clean manually the most important are

Title Track Number Album Artist Album Artist Disc Number Label

If I see your products you are suing espacillay iTunes.apple.com, I am using music.apple.com (there is YEAR)

I am quiet new on all of this, but if I can help in anyway, it will be a great pleasure

‌For Label you can use PUBLISHER

Many thanks, best regards

De : "Rego Sen" A : "regosen/get_cover_art" ,"aarkkappler" ,"Author" Envoyé: vendredi 23 Juillet 2021 20:13 Objet : Re: [regosen/get_cover_art] Feature request : is possible to add year, genre and label (#14)  

 

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 This 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? 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!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

regosen commented 3 years ago

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

audiomuze commented 2 years ago

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.