Commit graph

23 commits

Author SHA1 Message Date
Peter
0cd46dab77 fixing per review comments 2019-07-01 21:04:35 +02:00
Peter
8bf9d75f66 fixing test 2019-06-30 12:50:36 +02:00
Peter
0e2e2dfec3 adding additional discogs attrributes 2019-06-30 12:22:22 +02:00
Peter
e9dd226b93 fixing test 2019-06-30 12:06:38 +02:00
Peter
f0c91b8f45 fixing per review comments 2019-06-09 20:01:55 +02:00
Peter
5fc21a1e21 fixing per review comments 2019-06-09 15:39:49 +02:00
Peter
77dcd63254 adding line 2019-06-09 12:59:32 +02:00
Peter
9789c465aa removing blank line 2019-06-09 12:49:04 +02:00
Peter
371d978e13 removing blank line and making line shorter 2019-06-09 12:39:21 +02:00
Peter
6cdd1ab6c1 fixing test 2019-06-09 12:08:07 +02:00
Peter
851c413976 adding config option for seperator and addressing review comments 2019-06-09 10:37:33 +02:00
Dmitry Bogdanov
676536efa7 Fix incorrect indexing of two-sided mediums
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.
2018-04-27 19:28:35 +02:00
Diego M. Rodriguez
37cb1c295f
Merge remote-tracking branch 'upstream/master' into discogs-relax-assumptions
Conflicts:
	docs/changelog.rst
	test/test_discogs.py
2016-12-30 10:42:50 +01:00
Diego M. Rodriguez
0a9cb1fd3d
discogs: revise subtrack merging based on subindex
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.
2016-12-29 18:03:54 +01:00
Diego M. Rodriguez
30f238151e
discogs: additional sanity checks parsing release
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.
2016-12-29 13:19:01 +01:00
Diego M. Rodriguez
02666424d4
discogs: improve robustness when parsing an album
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.
2016-12-28 21:07:18 +01:00
Adrian Sampson
a88682e7bb Undo from _common import unittest indirection
This was a vestige from when we used to need the unittest2 library for pre-2.7
compatibility. Now that we require Python 2.7, we aren't using that library
and this indirection wasn't doing any good.
2016-11-26 18:46:44 -05:00
Diego Moreda
fc9f061574 discogs: add tests for medium, medium_total
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 #587.
2016-10-17 19:48:06 +02:00
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