Skip to content
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

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

Open
aarkkappler opened this issue Jul 22, 2021 · 6 comments
Open

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

aarkkappler opened this issue Jul 22, 2021 · 6 comments

Comments

@aarkkappler
Copy link

Many thanks :) for this product

@regosen
Copy link
Owner

regosen commented Jul 22, 2021

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
Copy link
Author

aarkkappler commented Jul 23, 2021 via email

@regosen
Copy link
Owner

regosen commented Jul 23, 2021

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!

@aarkkappler
Copy link
Author

aarkkappler commented Jul 24, 2021 via email

@regosen
Copy link
Owner

regosen commented Jul 24, 2021

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
Copy link

audiomuze commented Jun 2, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants