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
Malte Ried
023c13d292
Updated the test code to ignore the "Sending event" log messages.
2014-12-29 13:22:28 +01:00
Malte Ried
acec078fa3
The new event changed the log so an old import test failed...
2014-12-29 13:15:54 +01:00
Malte Ried
5123a41258
Added a flag --detailed to get a more detailed output of the --pretend option.
2014-12-29 12:54:16 +01:00
Thomas Scholtes
b33d5b577a
Catch exception when program check has non-zero return code
...
See #1175 .
2014-12-29 12:07:57 +01:00
Malte Ried
16abc858e3
Removed some testing code which was checked in accidentally
2014-12-29 12:03:52 +01:00
Malte Ried
7674399a45
Added the import_task_created event
...
Improved the IHatePlugin to filter files based on file names
2014-12-29 12:03:51 +01:00
Marc Addeo
8f41818434
Fix formatting to pass flake8 tests
2014-12-28 20:58:59 -05:00
Marc Addeo
a70820d8a1
Fix a bug in ftintitle with the order of album artist
...
There was a bug in the find_feat_part function that would cause it to
fail if the album artist was the second part of the featured string.
For example, if the Artist field was Alice & Bob, and the Album Artist
field was Bob it would return None due to the order.
This fixes that and adds test cases to ensure it doesn't return.
2014-12-28 20:23:17 -05:00
Marc Addeo
4d4113e3a4
Refactor ftintitle to extract the code to find the featured artist
...
This removes the code that extracts the featured artist from the
original artist field from the ft_in_title function and puts it into its
own.
It also adds a custom ArtistNotFoundException that find_feat_part will
throw if the album artist is not in the artist field.
This allows us to easily test the results of finding a featured artist
in the artist sting, and thus adds tests for the usual test cases that
the split_on_feat gets tested for.
2014-12-28 20:15:09 -05:00
Stig Inge Lea Bjørnsen
a2188d475b
ImportAdded support for in-place and link imports
...
Fix for the `ImportAdded` plugin crashing during in-place imports (#1107 ).
Add support for the new link imports introduced in Beets 1.3.9.
Note that link-imports that preserve file modification times will follow
the links and preserve the mtimes on the link targets. The mtimes on the
links aren't modified.
2014-12-25 21:39:28 +01:00
Adrian Sampson
74466fff89
Merge pull request #1162 from mried/import-pretend
...
Added option --pretend to only print the filenames
2014-12-23 09:08:09 -05:00
Malte Ried
5f67f3ae51
The last commit broke the tests. Repaired...
2014-12-21 21:52:09 +01:00
Malte Ried
440fe9a2ea
Reduced the count of accesses of the pretend config option. Now it's only one place where it is read.
...
Changed the output to use the log system rather than print_.
2014-12-21 21:37:44 +01:00
Malte Ried
2db346388a
Added option --pretend to only print the filenames of files to import without importing them
2014-12-21 15:56:56 +01:00
Adrian Sampson
b15102608c
Fix convert tests
...
Use some shell trickery to get the pipelined command to work.
2014-12-21 09:50:57 -05:00
Thomas Scholtes
ec65408c3e
Escape path queries for SQLite
...
Fixes #1146
2014-12-21 12:26:04 +01:00
Fabrice Laporte
e2506f3d03
change prints to ease sources copy/paste
2014-12-19 00:20:50 +01:00
Fabrice Laporte
c12dd5163d
add lyrics.com and lyrics.wikia.com to google srcs
2014-12-19 00:00:10 +01:00
Fabrice Laporte
01f484712e
change lyrics.com song
2014-12-18 23:59:37 +01:00
Fabrice Laporte
a41106652e
fix lyrics.net song url
2014-12-18 23:58:58 +01:00
Fabrice Laporte
69d3065e56
fix black magic woman lyrics keywords
...
“sticks” is last word of sentence so can be spelled “sticks.”, “magic”
is less ambiguous.
2014-12-18 23:57:46 +01:00
Fabrice Laporte
b89c8e78e3
remove test_util.py
2014-12-17 22:16:23 +01:00
Fabrice Laporte
7d0744d46b
lyrics: update unit tests
2014-12-17 22:04:54 +01:00
Fabrice Laporte
e7a4b92de5
lyrics: add 'sources' option
2014-12-17 00:42:11 +01:00
Fabrice Laporte
0f2f43ca9b
lyrics: add musixmatch source
2014-12-17 00:41:21 +01:00
Adrian Sampson
c2184be679
Merge branch '1060_ft_lang_support'
2014-12-16 11:53:59 +00:00
Adrian Sampson
c2c1e7236d
Simplify word boundaries ( #1060 )
...
Use lookahead/lookbehind matching to ensure there is whitespace around the
token. Replaces the use of \b, which doesn't work for "ft.", etc.
2014-12-16 11:49:54 +00:00
Fabrice Laporte
82de2a55bc
ftintitle unit tests
2014-12-13 23:35:59 +01:00
Fabrice Laporte
5434c028a4
lyrics: add sources to google CSE
2014-12-13 11:15:55 +01:00
Thomas Scholtes
20f809650c
zero: make tests more explicit
2014-12-02 18:07:19 +01:00
Thomas Scholtes
66b81ed081
echonest: test conversion failure
2014-12-02 11:54:36 +01:00
Thomas Scholtes
c248a71494
echonest: mock convert and truncate commands
2014-12-02 11:51:18 +01:00
geigerzaehler
d0e8be45a9
Merge pull request #1128 from geigerzaehler/edit-invalid-config
...
Allow invalid configuration files to be edited
2014-12-02 11:25:35 +01:00
Thomas Scholtes
575740f5a5
echonest: test different methods to fetch songs
2014-12-02 11:19:47 +01:00
Adrian Sampson
c41b8acf82
Merge pull request #1129 from geigerzaehler/zero-images
...
zero: Can delete embedded images
Conflicts:
docs/changelog.rst
2014-12-01 11:40:48 -08:00
Adrian Sampson
4670a8485f
Merge pull request #1127 from geigerzaehler/empty-dir-warning
...
Warn user when no files are imported from a directory
2014-12-01 11:30:26 -08:00
Thomas Scholtes
e2b2a505fc
zero: Can delete embedded images
...
Fixes #1100 .
2014-12-01 17:33:45 +01:00
Thomas Scholtes
9d3729dc5e
mediafile: Test deleting images and implement it for MP3s
2014-12-01 17:20:16 +01:00
Thomas Scholtes
eb8ccef8e6
Fix py26 string format
2014-12-01 13:05:29 +01:00
Thomas Scholtes
a5f097a883
Allow invalid configuration files to be edited
...
Fixes #1123 .
2014-12-01 13:02:21 +01:00
Thomas Scholtes
75c6af6329
Warn user when no files are imported from a directory
...
Fixes #1116 .
2014-12-01 12:31:49 +01:00
Marvin Steadfast
b25393151d
Added plexupdate plugin for refreshing plex music library after importing music.
2014-11-28 11:19:17 +01:00
Adrian Sampson
42228e6d82
Tests: fix unload_plugins
...
Don't mutate the base classes. This was causing plugins to break on the second
test that uses them, since after they were unloaded their class-level fields
were broken (since the modules are not re-loaded).
This makes it more clear than ever that we need to encapsulate plugin loading
state using some manner of PluginManager.
2014-11-24 10:58:32 -08:00
Marvin Steadfast
d3b76d83d2
Permissions plugins listens now for album_imported and item_imported
2014-11-24 18:41:50 +01:00
Adrian Sampson
daeab3d3a9
Add (skipped) tests for #359
2014-11-22 21:48:06 -08:00
Adrian Sampson
671d8d6aa7
Merge pull request #1098 from xsteadfastx/master
...
Added fix_permissions plugin
2014-11-20 07:38:21 -08:00
Marvin Steadfast
8784e8d8ca
plugin now listens for item_copied instead of after_write. now the test works
2014-11-20 11:40:02 +01:00
Fabrice Laporte
c69ad5d243
print google sources url
...
when releasing a beets version, run the script before running test_lyrics.py, and copy/paste the sources listed on stdout as a bulk add on Google CSE so beets engine is up-to-date.
2014-11-19 23:33:06 +01:00
Marvin Steadfast
a01e73d813
added not working test for debugging
2014-11-19 19:43:31 +01:00
David
5f1f6bbd04
Remove function from RmTempTest
2014-11-16 21:53:33 -05:00
David
e1ff258ce5
Move function to increase DRY
2014-11-16 21:39:58 -05:00
David
38f056a30c
Adding tests for #1067
2014-11-16 21:33:03 -05:00
David
b901071e2c
Implment -> Implement
2014-11-16 10:39:50 -05:00
Adrian Sampson
66d02bc289
Add link parameter to Item.move ( #710 )
2014-11-15 12:41:40 -08:00
Adrian Sampson
36d332ab6a
Fix #856 : album dirty tracking
2014-11-13 23:25:16 -08:00
Adrian Sampson
288fb0da4c
Merge pull request #1075 from Kraymer/1066-fetchart_sources
...
fetchart: add 'sources' option
2014-11-11 10:04:45 -08:00
Adrian Sampson
91ad0d9f58
Merge pull request #1069 from Kraymer/1035_no_copyright
...
Remove licensed lyrics from tests resources
2014-11-11 09:58:54 -08:00
Fabrice Laporte
a0579d66cf
lyrics: remove full texts from lyricstext.yaml
...
lyrics are considered valid if they contain a set of
selected keywords picked along the original full text.
2014-11-11 09:06:37 +01:00
Fabrice Laporte
1b0933daa9
fetchart: fix tests to handle generators
2014-11-10 22:37:19 +01:00
Fabrice Laporte
ef6d3efe6d
fetchart: cover engines yield their results
2014-11-10 22:17:34 +01:00
Adrian Sampson
68770f85e3
Update ALAC tests for Mutagen 1.26
...
The metadata extraction is now more accurate for ALACs, but we lost the
ability to distinguish them from AAC.
2014-11-10 10:06:21 -08:00
Fabrice Laporte
09bea52a41
fetchart: fix flake8
2014-11-09 20:55:53 +01:00
Fabrice Laporte
6170c3a179
fetchart: make test_art.py tests pass
2014-11-09 20:41:21 +01:00