Commit graph

15 commits

Author SHA1 Message Date
Bruno Cauet
327b62b610 Improve logging management for plugins: fixes
Delete the remaining usages of BeetsPlugin.listen().

Since BeetsPlugin.listeners are wrapped by a loglevel-setting function,
we cannot easily check their unicity anymore.
BeetsPlugin._raw_listeners set holds the raw listeners.

Legacy plugins that did not handle enough arguments in their listenings
functions may break: dedicated code is now deleted for it would not work
with the decorated listeners.

Tests got fixed. Some modifications were done empirically: if it passes
then it's okay.
2015-02-10 16:55:06 +01:00
Bruno Cauet
dbef31776f Replace ur'' strings by r'' strings
Since we use unicode_literals they are equivalent, but ur'' strings are
a syntax error in python 3.0+
2015-01-27 09:02:44 +01:00
Bruno Cauet
a5026100a3 All plugins use unicode_literals
Given that part of them has no test I may have broke them
2015-01-20 16:22:27 +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
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
Fabrice Laporte
3ead936fe5 flake8 cleaning beetsplug/*
Remaining warnings are related to visual indentation.
2014-04-13 23:24:57 +02:00
Adrian Sampson
456c8a7f01 fromfilename: fix #460: crash w/ no capture groups 2014-01-30 08:19:16 -08:00
Adrian Sampson
f42dabd1fa merge 2013-09-29 18:37:06 -07:00
Adrian Sampson
f9cc86be08 fromfilename: use unicode filename
As pointed out in #395, we need to decode the filename before doing our fancy
matches on it.
2013-09-29 18:35:43 -07:00
colin-scott
b6e7e0b817 Support singleton filenames.
Previously, track ids were assumed to be part of every filename. This
assumption does not hold for singleton tracks.
2013-09-26 12:26:15 -07:00
Adrian Sampson
9607b258a5 fromfilename: simplify 2013-09-13 21:14:10 -07:00
Adrian Sampson
b8f01f0cfa fromfilename: preserve case, apply in more cases 2013-09-13 21:05:51 -07:00
Adrian Sampson
3f6eb4be24 fromfilename: switch to declarative style
No need for redundant handleXfields methods; we'll just inspect the fields
we're given.
2013-09-13 20:48:12 -07:00
Adrian Sampson
9e1e55e6a5 fromfilename: python style, naming, comments 2013-09-13 20:34:05 -07:00
Adrian Sampson
47999dc759 initial import of tags-from-filename plugin (#113)
This was contributed via email. Now I'll clean it up for inclusion.
2013-09-13 19:50:12 -07:00