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

Support writing ISRC to tracks in Spotify plugin #4992

Closed
JOJ0 opened this issue Nov 10, 2023 · 3 comments · Fixed by #4996
Closed

Support writing ISRC to tracks in Spotify plugin #4992

JOJ0 opened this issue Nov 10, 2023 · 3 comments · Fixed by #4996

Comments

@JOJ0
Copy link
Member

JOJ0 commented Nov 10, 2023

Support ISRC track field in Spotify plugin.

The difficulty is that we currently if I'm not mistaken, only get a "Simplified Track Object" track object from Spotify while fetching album info: https://developer.spotify.com/documentation/web-api/reference/get-an-album -> look for this in the docs:

Screenshot 2023-11-10 at 09 48 10

I wanted to instantly open a PR to just add external_ids.isrc to the plugin but it's just not there in the response we currently get from the albums endpoint. We would need an additional request to this endpoint to get it: https://developer.spotify.com/documentation/web-api/reference/get-track

Because we need this data:

Screenshot 2023-11-10 at 09 51 16

There might be a better way, maybe asking the albums endpoint to include that field. Not sure if that's possible.

@JOJ0 JOJ0 changed the title Support writing the ISRC tracks in Spotify plugin Support writing ISRC to tracks in Spotify plugin Nov 10, 2023
@JOJ0
Copy link
Member Author

JOJ0 commented Nov 10, 2023

@arsaboo help me out: Where would you see this additional fetch in the code? I'm unsure if I want to get my hands dirty on that plugin yet :-) Maybe you are quicker ;-)

@JOJ0
Copy link
Member Author

JOJ0 commented Nov 10, 2023

FYI MusicBrainz often contains this info as well and beets fetches is as well and writes it to tracks. Also the Deezer plugin fetches it, it's easier with the Deezer API I guess, since it is included with the album's response we get already: https://github.com/beetbox/beets/blob/708a04d4a88eb955f261a21f0b1146c9e2ae0a55/beetsplug/deezer.py#L165C21-L165C21

Update: Hey but wait, deezer plug does an additional fetch for the tracks already: https://github.com/beetbox/beets/blob/708a04d4a88eb955f261a21f0b1146c9e2ae0a55/beetsplug/deezer.py#L111C17-L111C17

Spotify plug doesn't do that extra-fetch for tracks details!

@arsaboo
Copy link
Contributor

arsaboo commented Nov 12, 2023

@JOJ0 created a PR #4996 to update the ISRC field if available (note that not all albums return the ISRC field).

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

Successfully merging a pull request may close this issue.

2 participants