Commit graph

45 commits

Author SHA1 Message Date
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
30cf407074 Removed import of unicode_literals from plugins
* rewrite
* scrub
* smartplaylist
* spotify
* the
2016-02-20 14:31:27 +01:00
Jack Wilsdon
12cd5306b7 Update copyright dates to 2016 2015-12-30 15:42:06 +00:00
Adrian Sampson
7749cba00e scrub: Demote a log message to debug
This seems unnecessary in the `beet scrub` output.
2015-12-12 18:29:49 -08:00
Adrian Sampson
d5c51dd816 scrub: Restore tags & art in auto mode (#1657) 2015-12-12 18:28:58 -08:00
Adrian Sampson
f5448d1531 scrub: Run on import in auto mode (#1657) 2015-12-12 18:20:05 -08: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
Bruno Cauet
65a88e2bf4 Fix StrubPlugin.write_item() expected arguments
Fix #1338.
2015-02-24 19:30:51 +01:00
Adrian Sampson
313c3807aa scrub: Use syspath in beet scrub (#1297) 2015-02-02 10:42:31 -08:00
Adrian Sampson
465719a208 scrub: Catch IOErrors in command (fix #1297) 2015-02-02 10:13:48 -08:00
Adrian Sampson
ac3ea16656 Fix for unicode_literals in scrub
Here's an example where unicode_literals may not be a great idea: these should
probably be "native" strings, i.e., bytes on 2.x and unicode on 3.x.
2015-01-27 13:48:13 -08: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
4babc40fd8 Delete useless "config['mypluginname']" mentions
Replace with self.config where this is painless.
More plugins would benefit from this update but that requires turning
functions into methods.
2015-01-12 10:55:59 +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
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
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
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
e5e4eaeacd39c5cfba4d7c852c48277ae50331e6
65de93941d flake8 cleanup
Cleanup after cleanup
2014-09-09 11:28:43 +10:00
e5e4eaeacd39c5cfba4d7c852c48277ae50331e6
66aee8094f Clean up of logging messages as described here
All logging now prefers the ' (single quote) over the " (double quote)

https://github.com/sampsyo/beets/wiki/Hacking
2014-09-09 11:28:43 +10:00
Adrian Sampson
7de6259c1d MediaFile: make id3v23 a constructor parameter
For #899, we need to change MediaFile's behavior (pre-write) based on whether
we're doing ID3v2.3 or not. So we need a field on the object, not a parameter
to `save()`.
2014-08-15 12:09:18 -07:00
Adrian Sampson
4940958148 Fix #822: scrub/convert plugin conflict
We now correctly scrub the destination of a conversion, not the source.
2014-06-14 16:08:49 +01:00
Thomas Scholtes
c3ea1ded30 Add item.try_write() to log errors
Many commands and plugins use `item.write()` to update tags. Since the success
of the call is not critical to the functionality of most consumers we want to
catch any exceptions, log an error and continue with our task. The new method
encapsulates this logic.

This fixes #675.
2014-04-10 15:26:05 +02:00
Adrian Sampson
8a105b0cb9 Merged in yevgenybezman/beets/scrub-add-mp4 (BB pull request 1)
scrub: Added MP4 support to scrub plugin
2013-12-22 12:47:34 -08:00
Yevgeny Bezman
7310f0a371 scrub: Added MP4 support to scrub plugin
--HG--
branch : scrub-add-mp4
2013-12-22 22:04:47 +02:00
Adrian Sampson
3ccd231765 id3v23: remove one redundant case; changelog/thanks 2013-11-05 19:59:45 -08:00
Chris Cogburn
e9bc47a665 Fix for id3v23 to include config parameter to save 2013-11-05 21:29:49 -06:00
Adrian Sampson
d6dac1d35b scrub: no need to save after delete()
The delete() method on Mutagen objects writes the file directly. Calling
save() was unnecessary and, in at least one case we found, could inadvertently
preserve non-standard tags that Mutagen did not understand.
2013-10-08 14:49:29 -07:00
Adrian Sampson
fcab014510 scrub: opus support 2013-09-21 19:27:04 -07:00
Adrian Sampson
9597d5e370 scrub: restore album art (close #138) 2013-09-21 19:25:31 -07:00
Adrian Sampson
2f053b0ecd scrub: handle IOError
Mutagen can raise this error when trying to truncate a file.
2013-06-10 16:06:43 -07:00
Adrian Sampson
d0aaa511a3 minor style cleanup for #75 2013-01-29 21:30:57 -08:00
Dave Hayes
2f06a508bd Implements support for WMA/ASF
* Adds support for importing/managing .wma and .asf files
 * Adds support for all available ASF tag equivalents
 * Adds two utility methods for (un)packing embedded ASF pictures
 * Modifies scrub plugin to work around the lack of a delete method on
   ASFTags object.
2013-01-28 14:05:34 -06: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
f127d8e18a merge scrub fix from master 2012-12-31 18:25:51 -08:00
Adrian Sampson
287d00179a scrub: fix Py27-style format string (GC-484) 2012-12-31 18:11:31 -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
3ef9e006f4 finish confit-ifying all the plugins 2012-12-13 17:14:19 -08:00
Adrian Sampson
6c94358b13 begin Confit-ifying plugins in alphabetical order 2012-12-13 12:31:10 -08:00
Adrian Sampson
6200f0a4c8 scrub: remove all types of tags 2012-08-24 15:39:13 -07:00
Adrian Sampson
f6b37d2c8c remove with_statement __future__ imports
This is the first of several commits that will modernize the beets codebase for
Python 2.6 conventions. (Compatibility with Python 2.5 is hereby abandoned.)
2012-05-13 20:39:07 -07:00
Adrian Sampson
9920cc482c add "scrub" plugin (#280)
--HG--
rename : beetsplug/embedart.py => beetsplug/scrub.py
rename : docs/plugins/embedart.rst => docs/plugins/scrub.rst
2012-01-02 14:03:28 -08:00