Commit graph

1078 commits

Author SHA1 Message Date
Adrian Sampson
1a151c2272 Remove redundant config rest in tests
teardown_beets resets the configuration already.
2015-01-20 15:22:59 -08:00
Adrian Sampson
07f99e6ab7 Fix up tests for import_task_created (#1186) 2015-01-20 14:51:26 -08:00
Adrian Sampson
8e94419c2a Fix filefilter (#1186) tests for consistent colons
I added this to the pretend output a few commits ago.
2015-01-20 14:34:42 -08:00
Adrian Sampson
0a8dcadb75 Rename regexfilefilter to filefilter (#1186) 2015-01-20 14:32:22 -08:00
Adrian Sampson
ebc065ecec Merge branch 'mried-import-filefilter'
Merge of PR #1186.
2015-01-20 14:22:55 -08:00
Malte Ried
a62a152010 Moved the regular expression file filter into a separate plugin. 2015-01-20 19:50:00 +01:00
Bruno Cauet
b436e75a9e embedart: fix behaviour on IM unparseable output, add tests
Test all EmbedCoverArtPlugin.check_art_similarity() code paths.

Improve #1241.
2015-01-19 11:50:51 +01:00
Adrian Sampson
dc5a79e35c New import_task_created event
Part of #1186.
2015-01-18 15:37:48 -08:00
Malte Ried
0eb185a5e7 Merge branch 'master' into import-filefilter 2015-01-18 18:55:24 +01:00
Adrian Sampson
6fb3b24c31 Merge pull request #1221 from brunal/crash-on-invalid-queries
Stop on invalid queries instead of ignoring them
2015-01-15 10:50:05 -08:00
Bruno Cauet
f4b4847919 Rename exception: InvalidQuery → InvalidQueryError
Follow PEP8.
2015-01-15 11:47:35 +01:00
Bruno Cauet
b49cd3b73b Lyrics plugin: fix google backend
Give config on backends init so the Google backend can get the API key
and Engine Id.
Fix #1226
2015-01-15 11:28:04 +01:00
Bruno Cauet
0d1fa80651 Smartplaylist: don't utf8-encode the name
A Template expression expects an unicode, not an utf8-encoded string.
Add a test for that.
2015-01-14 12:32:00 +01:00
Bruno Cauet
3804eb5b52 Stop on invalid queries instead of ignoring them
So far an invalid query won't be applied:
    $ beet ls The Beatles year:196a
will be treaded as
    $ beet ls The Beatles
With this commit it stops beets, returns 1 and produces
    $ invalid query: u'196a' is not an int or a float
This applies to any querying and therefore on many command, plugins and
some configuration options.
Invalid queries exist on numeric fields and on regular expression usage.

Compile regular expression queries upon instantiation instead of upon
each match test.

The reporting can be improved (give more context). Fix #1219.
2015-01-14 11:28:50 +01:00
Malte Ried
ad65242ebd Merge branch 'master' into import-filefilter
Conflicts:
	beets/importer.py
	beets/plugins.py
	beetsplug/ihate.py
2015-01-14 10:46:03 +01:00
Bruno Cauet
2e57d8660e Ensure there's no duplicate plugin listeners
A same function cannot be registered twice on a given event.
This will permit improvements of some plugins (e.g. smartplaylist)
2015-01-13 11:29:42 +01:00
Bruno Cauet
621ea60af4 Improve importer log unicode-handling test
Send unicode instead of utf8-encoded string and check that the
non-ASCII char is correctly handled.

Bonus: use unittest.TestCase.assertIn(A, B) instead of "assert A in B".
2015-01-12 22:20:58 +01:00
Bruno Cauet
8418fb6083 Use a standard logger for the import log
The import log now relies on a standard logger, named 'beets.importer'
and configured upon initialization of the import session.
2015-01-12 21:47:44 +01:00
Bruno Cauet
b27c5304d1 Merge branch 'master' into logging
Conflicts:
	beetsplug/fetchart.py
	beetsplug/mpdstats.py
2015-01-09 15:15:27 +01:00
Adrian Sampson
1654fc82ce Merge pull request #1211 from brunal/fetchart-check-isfile
Fetchart: check that the art found is a file
2015-01-08 13:40:21 -08: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
Bruno Cauet
2e1b0d589d Fetchart: check that the art found is a file
Fixes issue #1177
2015-01-08 10:58:08 +01:00
Bruno Cauet
974155f2bc Fix pep8 in test 2015-01-06 22:10:30 +01:00
Bruno Cauet
df82e113e5 Fix embedart tests 2015-01-06 21:42:34 +01:00
Bruno Cauet
30562024d2 Fix Lyrics plugin tests 2015-01-06 21:42:10 +01:00
Bruno Cauet
1f62711221 Fix FetchArt tests 2015-01-06 21:42:10 +01:00
Bruno Cauet
1f0932968e Simple test fixes
importfeeds, lastgenre
2015-01-06 21:42:10 +01:00
Adrian Sampson
f6dc2cd81c Merge pull request #1198 from brunal/logging
Lazy {}-style logging everywhere
2015-01-05 17:34:30 -08:00
Adrian Sampson
59f5fc7f7f Remove nose dependency 2015-01-05 10:16:10 -08:00
Bruno Cauet
30f158a95e Move "from beets import logging" statements
Move the import next to other beets-related imports
2015-01-05 10:05:21 +01:00
Bruno Cauet
06f0e1dee1 Port beets.logging to python 2.6
Multiple hacks :-)
2015-01-05 09:21:11 +01:00
Malte Ried
d71a8227e2 Added documentation and tests 2015-01-04 19:02:22 +01:00
Bruno Cauet
52243269fc Make test/test_logging work on python 2.6 2015-01-04 17:14:34 +01:00
Bruno Cauet
408afa1b58 Add tests for beets.logging 2015-01-04 17:02:28 +01:00
Bruno Cauet
7df8bef8b7 Update logging imports: logging → beets.logging 2015-01-04 17:02:27 +01:00
Malte Ried
1c4dda4bd3 Merge branch 'master' into import-filefilter 2015-01-04 16:12:36 +01:00
Fabrice Laporte
80038e2a3f test_bucket: update test_year_single_year
2015 was used as an example of date outside of [1970-current year] intervall which is not true anymore
2015-01-03 23:03:29 +01:00
Malte Ried
c560a3d042 Recent changes broke the flake8 rules... 2014-12-31 17:20:47 +01:00
Malte Ried
61a20b3163 Modified the tests to match the new --pretend output. 2014-12-31 17:15:52 +01:00
Malte Ried
ab996a0de0 Merge branch 'master' into import-filefilter
Conflicts:
	test/test_importer.py
2014-12-31 17:04:16 +01:00
Malte Ried
7f4a06d12c Instead of emitting the import_task_created event using a pipeline stage, it is fired every time an import task was created. 2014-12-31 16:57:09 +01:00
Adrian Sampson
405726ba13 Merge pull request #1189 from mried/import-pretend-verbose
A more detailed output of the `--pretend` option
2014-12-31 08:41:22 -04:00
Malte Ried
0e74c5dbaa Rearranged regex config options to reduce hierarchies 2014-12-31 11:56:50 +01:00
Malte Ried
bee0a5b9fe Album tracks are prepended by two spaces to indent them a bit. 2014-12-31 11:38:03 +01:00
Malte Ried
cc82e1cb43 Made the detailed output the default behaviour. 2014-12-31 11:30:46 +01:00
Fabrice Laporte
38b890cdd6 lyrics: add test checking scraping of mocked page 2014-12-31 06:16:06 +01:00
Fabrice Laporte
c34e718ab6 lyrics: introduce empty div in mocked lyrics page 2014-12-31 06:15:41 +01:00
Fabrice Laporte
d4d5c085fa lyrics : remove empty divs before scraping
it may result in \n being inserted that we will strip in
_scrape_strip_cruft
2014-12-30 23:37:23 +01:00
Malte Ried
8addf3ef39 Simplified the configuration of the regular expressions for th ihate plugin
Added the docs
2014-12-30 14:11:45 +01:00
Malte Ried
11008494c3 Tests failed on windows 2014-12-30 12:45:29 +01:00