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

discogs: disc field is set to zero #587

Closed
l-t-k opened this issue Mar 8, 2014 · 2 comments
Closed

discogs: disc field is set to zero #587

l-t-k opened this issue Mar 8, 2014 · 2 comments
Labels
bug bugs that are confirmed and actionable

Comments

@l-t-k
Copy link
Contributor

l-t-k commented Mar 8, 2014

Releases coming from MB with only a single disc are tagged in a correct way (to my view) like: 1/1. However, when using the discogs plugin for releases from discogs the disc field of a single disc album is set to 0/1.

What is exactly going wrong here? Is it just a mistake within the plugin or is it the discogs database serving the wrong 0/1 disc tag? And, is there a workaround to avoid this and have it tagged in the correct way like MB does as 1/1?

@sampsyo sampsyo added the bug label Mar 8, 2014
@sampsyo
Copy link
Member

sampsyo commented Mar 8, 2014

Thanks for the report—I was able to reproduce this; it seems to be a bug. The code that numbers the discs (a.k.a. mediums) in discogs.py is somewhat obscure so the problem is not immediately obvious. Someone sober (perhaps you, @kooimens?) should stare at this section to see what's going on.

The whole mess there could use some simplification. See also #415.

@sampsyo
Copy link
Member

sampsyo commented Mar 8, 2014

You can write almost exactly what you said in Python: 1 if disc == 0 else disc

Or even more Pythonically: disc or 1

diego-plan9 added a commit to diego-plan9/beets that referenced this issue Oct 17, 2016
Add three tests for the setting of tracks' medium and medium_total on
the discogs plugin. test_parse_medium_numbers_single_medium is meant
to fail due to beetbox#587.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs that are confirmed and actionable
Projects
None yet
Development

No branches or pull requests

2 participants