Commit graph

72 commits

Author SHA1 Message Date
FichteFoll
c144141e9a
Update a few more http URLs to https that I missed
Should really be all now (pending the next commit).
2019-06-05 23:07:11 +02:00
Adrian Sampson
3ddf3ef58a
Merge pull request #3022 from beetbox/default-ignore-data-tracks
Make `ignore_data_tracks` `yes` by default
2018-09-05 23:13:44 -04:00
Filipe Fortes
2b41775b8a Fix tests 2018-09-05 11:37:54 -04:00
David Logie
57b268923f Split release and release-group disambiguation into separate fields. 2018-09-05 12:45:19 +01:00
Filipe Fortes
692060cc0a Re-order tests 2018-09-04 11:33:07 -04:00
Filipe Fortes
1701aefe5c Make ignore_data_tracks yes by default 2018-09-04 10:04:17 -04:00
Filipe Fortes
210b9d316f Allow ignoring of audio data tracks on import 2018-09-02 10:09:10 -04:00
Jérémie Detrey
f74899ab9a Fix errors due to missing track['id'] in unit tests. 2018-04-30 18:26:06 +02:00
Jérémie Detrey
c1d1388729 Unit test for import with video data tracks. 2018-04-29 20:19:11 +02:00
Jérémie Detrey
e88a7cea90 Unit test for import with audio data tracks. 2018-04-29 20:06:44 +02:00
Nicolas Guillaumin
816de1c3da Rename setting to ignored_media for consistency 2018-01-02 15:04:00 -08:00
Nicolas Guillaumin
22c4f9cb97 Added a setting to control which formats are ignored
This is related to #2688 where a list of hard-coded non-audio formats to
ignore has been added. Some users may want to rip the audio portion of
video tracks (e.g. DVD-Video) so it would be beneficial to let them
control exactly which formats to ignore.

I added a `ignored_formats` setting for that purpose and moved the
hard-coded list into the config. Test and documentation have been
updated accordingly.

Aside: I also clarified the changelog a bit regarding this change and
the related one for #1210.
2018-01-02 11:03:02 -08:00
Nicolas Guillaumin
d325bceb1d Added a setting to control if video tracks are ignored
Users may want to keep tracking video tracks, for example if they rip
the audio part of the video tracks. Added a setting to allow this.
2017-12-31 10:46:48 -08:00
Nicolas Guillaumin
71b4d5c702 Fixes #1210: Skip non-audio tracks from MusicBrainz
This ignores non-audio tracks during import:
- Data tracks, based on their title `[data track]` (which seems to be
the MusicBrainz convention, as there's no specific flag to indicate
that a track is a data one),
- Video tracks, based on the `video=true` attribute.

It's similar to the Picard changes mentioned in #1210, except it doesn't
deal with `[silence]` tracks: These ones will probably require a setting
to let the user control if they should be imported or not.
2017-12-30 19:20:43 -08:00
Nicolas Guillaumin
3b491ce9b4 Fixes #2688: Skip non-audio media from MusicBrainz
Some releases have non-audio media, such as CD+DVD or CD+DVD-Video. Skip
these media when fetching album info as they will never match audio
tracks and will always report missing tracks.

I took the naive approach of cherry-picking a list of media suspected to
not contain audio from the MusicBrainz formats list:

https://musicbrainz.org/doc/Release/Format
2017-12-30 13:29:37 -08:00
Adrian Sampson
703f47ae97 Use flexible attribute for track_alt
No need for a built-in field for a simple string-type optional field like
this.
2017-01-10 21:01:36 -05:00
Mike Cameron
3cd4f1c091 Fixed failing test where track number was missing from mocked data. 2017-01-10 18:57:42 -05: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
Johnny Robeson
10dda13d2a remove unneeded bytes casting from test_mb 2016-06-12 18:03:08 -04:00
Adrian Sampson
71b9fd785c Revert "Do __name__ comparison with bytes and not unicode"
This reverts commit 9c41c39913.
That commit used byte strings for the `if __name__ == '__main__'` pattern,
which was necessary when we were doing unicode_literals. But it is wrong on
Python 3, and now that we're liberated from unicode_literals, we need to go
back to native strings for this comparison.
2016-05-29 19:19:59 -07:00
Adrian Sampson
e54c7eec3d Standardize __future__ imports without parentheses
Since the list is short enough now, we don't need parentheses for the line
wrap. This is a little less ugly.
2016-02-28 15:03:51 -08:00
Peter Kessen
a94bfa9eb9 Removed import of unicode_literals from test_mb 2016-02-22 07:40:07 +01:00
Jack Wilsdon
12cd5306b7 Update copyright dates to 2016 2015-12-30 15:42:06 +00:00
Peter Kessen
3eb8008b11 added encoding as comment in files
added line like
# -*- coding: utf-8 -*-
to all files with correct license in header
2015-11-19 18:41:01 +01:00
Adrian Sampson
287f0d8cef Fix typo and test bug revealed by mock fix
Mock used to tolerate a mistyped call like `assert_calledwith` when we meant
`assert_called_with` silently. This seems to be fixed. Fixing the typo
revealed that the assertion was actually wrong, so I fixed that too.
2015-07-13 16:34:09 -07:00
Tom Jaspers
20ae26dd77 Importer metadata source is set as a field: tests
See #1311
2015-02-11 10:14:56 +01:00
Bruno Cauet
53c21330c2 All tests use unicode_literals 2015-01-20 15:58:02 +01:00
Bruno Cauet
02d8e88ef1 Replace all mentions of 'str' with 'bytes' 2015-01-20 12:48:15 +01:00
Bruno Cauet
9c41c39913 Do __name__ comparison with bytes and not unicode 2015-01-20 12:03:57 +01:00
Bruno Cauet
90b388b775 Use __future__ imports but unicode_literals everywhere
Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.

Goal is smoothing the transition to python 3.
2015-01-19 12:25:16 +01:00
Bruno Cauet
2902cda036 tests: use absolute imports everywhere 2015-01-19 12:25:15 +01:00
Frederik “Freso” S. Olesen
4b1f0cbf48 Happy 2015. ;)
See 7a410f636b

Command used:

    git grep -l 'Copyright 201'|xargs sed -i -E 's/Copyright 201./Copyright 2015/'`
2015-01-08 21:37:09 +01:00
Adrian Sampson
6aa9e60756 Add tests for #1029
The mbngs library does not like to be called with whitespace-only criteria.
2014-10-24 16:30:14 -07:00
Thomas Scholtes
98ae8cbbc9 Make tests conform to PEP8 2014-09-09 22:31:46 +02:00
Filipe Fortes
ea90321226 Update tests given new alias behavior 2014-03-26 13:01:42 -07:00
Adrian Sampson
787918fdc3 changelog, tests, slight reorg for #187 2013-09-30 11:13:13 -07:00
Adrian Sampson
a5422eeaf7 use track length over recording length
Closes #341. Also, 666 tests! Woohoo!

--HG--
extra : amend_source : f00626f20e2475edcf220772223080ef62f46d84
2013-09-16 17:35:22 -07:00
Adrian Sampson
611dc44c46 fix tests for ID parsing (#291)
The previous tests accessed the network. This refactoring lets us test the ID
parsing in isolation.
2013-05-29 14:51:16 -07:00
Johannes Baiter
ad66b8796a Fix tests for albums from manual ID 2013-05-28 13:50:20 +02:00
Sam Doshi
8394619b99 add unit tests for aliases (#102) 2013-02-27 09:17:42 +00:00
Adrian Sampson
e0bb3b5cd0 original_{year,month,day,date} fields (GC-441) 2013-02-08 13:28:51 -08:00
Adrian Sampson
50a89e790c both release and release group disambig (#87)
This joins the two strings with a comma if both are present.
2013-02-02 12:42:53 -08:00
Peter Schnebel
663574c7ff Adapted test to pull request #87 2013-02-01 18:10:11 +01:00
Adrian Sampson
7a410f636b happy new year
For future reference, this command did the trick:
ack -l 'Copyright 201' | xargs perl -pi -E 's/Copyright 201./Copyright 2013/'
2013-01-11 10:43:41 -08:00
Adrian Sampson
98d46be4a5 include global index in TrackInfo objects 2012-06-29 14:06:28 -07:00
Adrian Sampson
c0da62c2b7 multi-artist sort names 2012-05-19 16:35:52 -07:00
Adrian Sampson
1387f30295 parse artist credits from MB responses (GC-286) 2012-05-19 15:42:08 -07:00
Adrian Sampson
b68e87b92c The Great Trailing Whitespace Purge of 2012
What can I say? I used to use TextMate!
2012-05-13 20:22:17 -07:00
Adrian Sampson
ed495765e2 tolerate missing language from MB (#373) 2012-04-10 11:38:45 -07:00
Adrian Sampson
4fdebcff2d parse & apply new set of fields 2012-04-04 09:13:26 -07:00