Commit graph

5 commits

Author SHA1 Message Date
Diego Moreda
f4907ca5d0 discogs: handle nested subtracks, add try block
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).
2016-10-10 19:59:42 +02:00
Diego Moreda
fb398c5f2c discogs: add medium_total to tracks (#415) 2016-10-10 17:46:41 +02:00
Diego Moreda
1148acaaf1 discogs: revise position regexp, add tests, tox
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.
2016-10-10 17:42:27 +02:00
Diego Moreda
1c63d0bbab discogs: add more unit tests
Add unit tests covering the discogs standard positions (12.2.9). Clean
up a bit the helper methods (unused parameters, documentation).

https://www.discogs.com/help/submission-guidelines-release-trk.html#Position
2016-10-07 18:44:55 +02:00
Diego Moreda
9c88998a5d discogs: add initial unit test skeleton
Add a first skeleton for providing unit tests for the discogs plugin,
heavily inspired by test_mb, which adds a couple of method for creating
very simple and not comprehensive Bags that mimic discogs_client.Release
and discogs_client.Track.
Add a test for checking the problem of setting media for the Tracks.
2016-10-06 19:31:55 +02:00