Master releases roughly correspond to MusicBrainz' release groups.
It will be usefull to store master IDs, for example to retrieve
original release dates (#1122).
Discogs does not provide track IDs. As a workaround, invent our own
IDs by combining release ID with original track position strings
returned by Discogs (#2336).
Fix incorrect split of a tracklist by medium for the case of
two-sided mediums (#2887).
Following the discussion in #2887, the 'medium_total' value should
contain the number of tracks on the medium to which each particular
track belongs, not the total number of different mediums present on
a release.
Fix unit tests accordingly.
The official OAuth authentication seems to have broken, so allow usage
of simple configuration instead.
See-Also: https://github.com/discogs/discogs_client/issues/78
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Modify the coalescing of subtracks by taking into account the subindices
of the subtracks for deciding if they represent "logical" tracks
(merging them into one single track, as previously) or if they represent
physical tracks (treating them as individual tracks).
Add unit tests for nested logical/physical subtracks, and disc titles.
Add extra checks for the presence of specific field (artists, title,
id, tracklist) when parsing a Release from discogs, failing gracefully
if the fields could not be found.
Add a test for releases without required fields.
Improve the robustness of `get_album_info()` by preferring the use of
`get()` over accesing the dictionary keys directly for several fields,
plus adding extra checks for fields that depend on nested containers on
the Release data.
Add a test for parsing a release that contains a minimal amount of
fields.
Discog plugin overrides the global logging for `requests` for a reason
that seems no longer valid.
I can't seem to reproduce the logging behavior mentioned in the
preceding comment, so I'm removing it.
If we do want to modify `requests` logging in the future, then we should
hook it into beets verbose logging.
Fixes#587. The disc field is only zero when there is only one medium, so I think this will do the trick. I wasn't able to reproduce the real problem within the code. This is just a small workaround.
Modify coalesce_tracks() in order to handle the case where subtracks
are defined inside an index track (as `sub_tracks` attribute),
reorganizing the if logic to avoid duplicated code.
Add a try..catch block enclosing the call to clean_tracklist, as a
measure for avoiding side effects (and reverting to just parsing the
raw_list if there are any problems).
Revise the regular expression used for extracting information from a
discogs position, making the subtrack_index only be matched if one of
the other groups is matched as well. Split the definition into several
lines in order to try to document it a bit more clearly.
Add unit tests for position parsing and non standard positions.
Fix the underscore on tox dependency.
Detect subtracks and merge them into a single track, taking into account
the index tracks if present. This includes a revision of the regular
expression used for converting a discogs "position" into medium, medium
index and subtrack index pieces, following the standard discogs
positions (12.2.9).