Commit graph

48 commits

Author SHA1 Message Date
Carl Suster
6382c364e2 confit: replace with confuse in plugins 2019-06-01 10:03:41 +10:00
Carl Suster
546bf3af7e mediafile: import from standalone module 2019-05-29 09:35:14 +10:00
nath@home
8e29a3ffcb Zero: Last minute unimportant fixes:
*Remove the artifact of a debug log.
*Remove meaningless version number.
*Rephrase some docstrings.
*Remove tautological comments.
2016-12-27 19:13:29 +01:00
Josh Brown
b6577b4226 refactor long line for PEP8 2016-12-26 14:42:10 -06:00
Josh Brown
7833469261 add confirmation for empty query 2016-12-26 14:13:01 -06:00
Josh Brown
2903925e2f Rewrite zero plugin manual mode 2016-12-26 13:34:34 -06:00
nathdwek@laptop
96d331ace0 Zero: cleanup plugin 2016-12-24 19:13:10 +01:00
Johnny Robeson
fcbfce3984 replace deprecated log.warn() with log.warning() 2016-08-09 00:33:38 -04:00
Johnny Robeson
e8afcbe7ec replace unicode with six.text_type 2016-06-24 05:53:49 -04: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
feab3df910 Removed import of unicode_literals from plugins
* mpdstats
* mpdupdate
* permissions
* zero
2016-02-20 14:12:37 +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
8c35a24073 zero: Check for conflicts only once (#1641)
The old version would trigger the warning twice.
2015-10-17 14:39:53 -07:00
Adrian Kowalski
d180d42ddb Fix flake8 complaint about line length 2015-10-12 09:50:12 +02:00
Adrian Kowalski
da655534ae Change function name and correct documentation style 2015-10-12 09:39:20 +02:00
Adrian Kowalski
158486319f Improve code quality, separate shared logic into functions 2015-10-09 21:23:59 +02:00
Adrian Kowalski
9f51e46bae Add whitelist feature to zero plugin 2015-10-09 18:41:42 +02:00
David Logie
71d3be238b zero: optionally update tags in the database. 2015-07-21 16:54:23 +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
Bruno Cauet
b27c5304d1 Merge branch 'master' into logging
Conflicts:
	beetsplug/fetchart.py
	beetsplug/mpdstats.py
2015-01-09 15:15:27 +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
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
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
7df8bef8b7 Update logging imports: logging → beets.logging 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
Thomas Scholtes
e2b2a505fc zero: Can delete embedded images
Fixes #1100.
2014-12-01 17:33:45 +01:00
Thomas Scholtes
db391c8f20 zero: Only changes media file tags not database
Uses the new API from the previous commit and fixes #963.

There is a possible issue with backwards compatibility: Changes to the
item in the 'write' event do not propagate to the tags anymore. But I'm
not aware of other plugins that use the API in that way.
2014-09-17 12:17:20 +02:00
Thomas Scholtes
492cf38927 Use item[field] instead of getattr(item, field) 2014-09-14 16:13:35 +02:00
Bruno Cauet
469ec40c0f Zero plugin: do not zero important fields
Prevent zeroing fields id, album_id and path.

Fix issue #475.
2014-06-08 17:26:17 +02:00
Adrian Sampson
fb37be44db restore some comments from #684
I wanted to leave a few of these as comments -- they serve more as separators
than as internal documentation.
2014-04-13 17:43:43 -07:00
Fabrice Laporte
3ead936fe5 flake8 cleaning beetsplug/*
Remaining warnings are related to visual indentation.
2014-04-13 23:24:57 +02:00
Thomas Scholtes
c27d26ddbf Refactor zero plugin 2014-04-10 22:01:04 +02:00
Thomas Scholtes
f6f974ec87 Remove ITEM_* constants
We might consider renaming `Item._fields` to `Item.fields` since other parts of
beets use it as a replacement for `ITEM_KEYS`.

See also #650.
2014-04-10 17:11:21 +02:00
Adrian Sampson
9a6b6240d0 zero: fix nulling fields containing None 2013-06-01 17:28:59 -07:00
Adrian Sampson
e6ea6dc875 zero: remove redundant list of dict's keys 2013-01-31 12:15:18 -08:00
Adrian Sampson
58d9a775cc remove singleton enforcement from plugins
The plugin system itself now enforces single instances.
2013-01-31 12:13:19 -08: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
a23b685747 use Confit's as_str_seq() instead of get(list)
This validator lets the user write either a real list, like [a, b, c], or just
a whitespace-separated string, like a b c. This is a little nicer for some
settings like "plugins" where the brackets and commas just look like line
noise.
2012-12-20 17:03:51 -08:00
Adrian Sampson
fbcd1d1c18 merge fixes from master 2012-12-19 12:22:23 -08:00
Adrian Sampson
6d68a4855e per-plugin configuration defaults in __init__()
This uses the new BeetsPlugin.config convenience view heavily. Things are
slowly getting less verbose.
2012-12-18 22:35:44 -08:00
Adrian Sampson
3a0ac96cc5 zero: Unicode logging calls 2012-12-17 15:08:48 -08:00
Adrian Sampson
3ef9e006f4 finish confit-ifying all the plugins 2012-12-13 17:14:19 -08:00
Adrian Sampson
1662f34528 "plugin is not configured" logged as debug message
@tezoulbr: I'm changing these to debug messages partially so they don't print
out when running the tests (with nose, for example) but also because it could
get a little annoying for someone who *intends* to use the defaults for one of
these plugins. Let me know if you disagree.
2012-10-09 10:47:19 -07:00
Blemjhoo Tezoulbr
a4033faf3b zero plugin: ver 0.10 - code cleanup 2012-10-05 00:47:46 +03:00
Adrian Sampson
2793af7d70 zero, the: Python 2.6-compatible format strings 2012-09-25 15:13:33 -07:00
Blemjhoo Tezoulbr
aff36fa694 zero plugin, version 0.9 2012-09-22 15:50:33 +03:00