-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Discogs: fetch original release year/date #1122
Comments
Thanks! See also #465. If anyone has some time to devote to this, it would be very helpful to know where the original date appears (if at all) in discogs responses. Just take a look at some API result and look around for the info we need. |
The problem is that the 'year; attribute is not returned reliably. Especially for editions that don't have a release date either. It also sometimes seems to be set to the year the edition was released. Seems like the right way to do this would be query the Master Release for which master_url should be provided when you query a release. Then take the year from that which should be the original date (or at least the earliest date for which discogs knows of a release) and also should be returned more reliably. Only if that fails take the year attribute of the specific release. Only thing a little weird is in the api documentation they say 'Masters have a “main release” which is often the chronologically earliest.' Often doesn't really seem strong enough for what is wanted here. Not quite sure what caused that them to say it like that. I guess what could be done is query /masters/{master_id}/versions which gives all versions of the same release and then loop through and choose the earliest date but that seems a bit crazy especially as it might require dealing with pagination. I don't know how many hits on the api is acceptable. |
I think the "main release" date would work well. In my experience it always coincides with the original release. No pagination necessary, and it's better than nothing. |
Master releases roughly correspond to MusicBrainz' release groups. It will be usefull to store master IDs, for example to retrieve original release dates (beetbox#1122).
I can implement this in my pull request if you confirm that this is a good solution. |
Sounds good, but could you use a separate PR? It's nice to be able to review one fix/improvement at a time. |
This adds an additional Discogs API call inside get_album_info(). Assume that original_year equals to year for releases without a master release.
Fetch original_year from master releases for Discogs (#1122)
Any suggestion as the cleanest way to re-import those albums (with v 1.4.7) already in the beet database and moving their path accordingly to the beet config
cheers ! |
thanks a lot @sampsyo (and sorry for that) |
actually for reference (for someone else), the best way to re-import (which does the move automatically) for this specific issue was to do beet import -L -a original_year:0000 |
The Discogs plugin currently doesn't seem to fetch the original release year of an album, for instance this 1984 release of a 1972 album returns the 'year' as 1984 (which is correct) and the 'original_year' of 0000 (not correct, obviously :D)
The text was updated successfully, but these errors were encountered: