Commit graph

1274 commits

Author SHA1 Message Date
Bruno Cauet
00d5473187 Merge branch master into logging
Conflicts:
	beetsplug/lyrics.py
2015-01-06 21:46:04 +01:00
Bruno Cauet
b2582c5d62 MusicBrainz collection plugin: delete "print" uses 2015-01-06 21:42:34 +01:00
Bruno Cauet
f504c78681 Fix usage of embedart by convert plugin
Instanciation of EmbedCovertArtPlugin on the fly: there may be several
instances → problem with the listeners it registers?
2015-01-06 21:42:28 +01:00
Bruno Cauet
8097ff8c1d Convert fetchart plugin, with OO rewrite of sources
Art sources are now classes
2015-01-06 21:42:10 +01:00
Bruno Cauet
5c1cc6e7fc Convert the convert plugin to the new logging system 2015-01-06 21:42:10 +01:00
Bruno Cauet
11d5f93db1 Convert importadded plugin
Many listeners. Everything is now a method
2015-01-06 21:42:10 +01:00
Bruno Cauet
63041736e3 Convert lyrics plugin, with OO rewrite of backends 2015-01-06 21:42:10 +01:00
Bruno Cauet
860e7e1483 Update 3 plugins: func → methods, listeners
- functions turn into method in order to have the logger object
- registering the listener has to be updated too
2015-01-06 21:42:09 +01:00
Bruno Cauet
203b325ee7 Convert mbsync logging: big funcs → methods 2015-01-06 21:42:09 +01:00
Bruno Cauet
74e18afa94 Convert bdp: pass around with static setter on classes 2015-01-06 21:42:09 +01:00
Bruno Cauet
32673b87e7 Update multiple plugins: pass the logger around 2015-01-06 21:42:09 +01:00
Bruno Cauet
7d58a38428 Convert replaygain: pass logger to other classes
This time the logger is passed to the other classes of the module, not
to functions.
2015-01-06 21:42:02 +01:00
Bruno Cauet
38352f7058 Update chroma plugin logging: pas logger around
The logger is passed as an argument to multiple function. This showcases
the second possibility for using the new logging system. Several similar
conversions to be expected.
2015-01-06 21:42:02 +01:00
Bruno Cauet
1be3dade04 Convert freedesktop plugin logging: func → method
This serves as an introduction for many plugin updates to come.
Multiple functions have to turn into methods -- and this is one of the
shortest plugins.
2015-01-06 21:40:58 +01:00
Bruno Cauet
e14a54df05 Convert multiple plugins' logger usage (easy ones)
Those plugins only called methods and no function, which eases the
conversion.
2015-01-06 21:34:13 +01:00
Bruno Cauet
0617c0410f Remove log declarations where it was unused
Easiest conversions!
2015-01-06 21:34:12 +01:00
Bruno Cauet
78ac338c28 Delete _log definition where it was already used
Easy switch to the new logger
2015-01-06 21:27:16 +01:00
Bruno Cauet
1afe82fb41 Make 2 plugins rely on auto log level mgmt
ftintitle and title don't do manual management anymore.
2015-01-06 21:27:15 +01:00
Bruno Cauet
427f7e7035 Automatic logger level changes on import
Breaking changes: plugins should set set _import_stages instead of
import_stages. From outside the latter is replaced by import_stages().
This is because it is now wrapped with log level-getting & -setting
statements.
2015-01-06 21:27:15 +01:00
Adrian Sampson
258fa10767 Merge pull request #1206 from Freso/patch-1
lastgenre: Add "comedy" to genre whitelist.
2015-01-06 11:22:07 -08:00
Adrian Sampson
daba9e770e Fix #1204: insecure request warning in lyrics 2015-01-06 11:01:11 -08:00
Frederik "Freso" S. Olesen
3940f3a1c2 lastgenre: Whitelist "humor" + "stand-up".
https://botbot.me/freenode/beets/msg/28878482/
2015-01-06 19:50:00 +01:00
Frederik "Freso" S. Olesen
6fb810289f lastgenre: Add "comedy" to genre whitelist.
See discussion from https://botbot.me/freenode/beets/msg/28875043/
2015-01-06 15:44:39 +01:00
Bruno Cauet
b8211a3c4c Every plugin uses its own logger
logging.getLogger(__name__) everywhere!
Several loggers prefixed every log message with [logername], which we
delete here.
2015-01-06 10:35:44 +01: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
45db930457 embedart: restore an apparent typo (which wasn't)
hashes → phashes
2015-01-05 07:59:53 +01:00
Bruno Cauet
f5c5666729 Attain pep8-cleanliness
No more E12 or E501
2015-01-04 17:29:31 +01:00
Bruno Cauet
7df8bef8b7 Update logging imports: logging → beets.logging 2015-01-04 17:02:27 +01:00
Bruno Cauet
6bdb02c721 Fix logging formatting string in duplicates plugin
{)} → {0}
2015-01-04 17:02:27 +01:00
Bruno Cauet
8cac47af2a Convert beets plugins to lazy logging 2015-01-04 17:02:27 +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
Adrian Sampson
fd94094c1b Changelog and name change for #1156 2014-12-30 15:27:17 -04:00
Adrian Sampson
e547426b8c Merge pull request #1156 from djl/lastgenreunicode
lastgenre: Optionally replace unicode characters when performing lookups
2014-12-30 15:25:40 -04:00
David Logie
08d5b9c138 Fix line length in docstring. 2014-12-29 19:45:33 +00:00
David Logie
f2704461cf Go back to a single lookup with specific Unicode characters replaced. 2014-12-29 19:37:03 +00:00
Adrian Sampson
d0dcc74c7e Merge pull request #1181 from marcaddeo/fix-ftintitle-duplicate-album-artist
Fix handling of duplicate album artists in ftintitle
2014-12-28 18:58:36 -04:00
Adrian Sampson
375f9259b9 Merge pull request #1176 from Freso/issue-1172-ftintitle-less-import-verbosity
ftintitle: use log.log() for outputting
2014-12-28 18:52:21 -04:00
Marc Addeo
8c484a273c Fix handling of duplicate album artists in ftintitle
The code that determines the featured artist part of the artist only
handles two element lists. When the album artist is duplicated, it
splits into a three element list causing no featured artist to be found.

This ensures the albumartist_split can ever only have 2 elements.

Fixes #1179
2014-12-28 17:51:48 -05:00
Stig Inge Lea Bjørnsen
9227a51588 Add a missing space 2014-12-28 20:40:46 +01:00
Frederik "Freso" S. Olesen
0ec3396d3f ftintitle: Use log.log() instead of ui.print_().
Fixes #1172.
2014-12-28 20:33:56 +01:00
Frederik "Freso" S. Olesen
6182ef1b1e ftintitle: Remove empty ui.print_() call. 2014-12-28 20:33:15 +01:00
David Logie
148d9048d5 Update _cached_lookup() docstring. 2014-12-28 18:38:42 +00:00
David Logie
433d68724a Escape Unicode characters so we don't need the encoding headers. 2014-12-28 18:38:15 +00:00
David Logie
3015c22d40 Fix indent level. 2014-12-26 14:17:49 +00:00
David Logie
d9673ef9b5 lastgenre: Only replace a small set of unicode characters. 2014-12-26 14:08:22 +00: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
Michael Ludwig
c76f8bee46 embedart: Added syspath call to art exists check 2014-12-21 13:08:02 -05:00
Adrian Sampson
016c901e6f Fix 2.6 compatibility with subprocess
We can add this back once we go 2.7-only.
2014-12-21 10:09:43 -05:00
Adrian Sampson
e8158194d6 More robust templating (#1157)
Don't require $source and $dest to be bare tokens.
2014-12-21 09:42:58 -05:00
Adrian Sampson
8579412a76 No shell execution (#1157)
Now that we do the proper thing, we do not need shell parsing.
2014-12-21 09:31:41 -05:00