Commit graph

45 commits

Author SHA1 Message Date
Šarūnas Nejus
d93ddf8dd4
Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
Šarūnas Nejus
4a361bd501
Replace format calls with f-strings 2025-08-30 18:42:26 +01:00
Nicolas Mémeint
eb497eee1a Only consider release collections in mbcollection plugin 2025-07-07 13:25:25 +02:00
Serene-Arc
a6e5201ff3 Apply formatting tools to all files
This is 'the big one', which touches every file so that it all conforms
to the given standard.
2023-10-22 09:53:18 +10:00
Andrew Rogl
1ec87a3bdd pyupgrade beetsplug and tests
All tests working
More tidy up to be done
2021-08-26 19:12:51 +10:00
David Logie
d6b6ebbeb9 mbcollection: Make sure missing albums are removed from collections correctly. 2018-02-23 12:34:33 +00:00
David Logie
c10e62f212 mbcollection: Fix default 'remove' value.
If the default is not None the value cannot be overriden by the user's
config.yaml.
2017-11-13 15:48:22 +00:00
David Logie
bed003f97b Use the built-in method of overriding config with cli options. 2017-09-18 18:19:51 +01:00
David Logie
61b0246651 mbcollection: Add support from removing albums.
Add a new ``mbcollection.remove`` configuration option (default: None)
and a new ``-r`` (``--remove``) flag which removes albums from
collections that are no longer present in the beets database.

The ``-r`` flag takes precedence over the ``remove`` configuration
option.
2017-09-14 15:49:42 +01:00
David Logie
7db09c6aba Silence pep8 warning. 2017-09-09 19:13:44 +01:00
David Logie
46f7ce78f1 mbcollection: Support specifiying collection ID. 2017-09-09 18:59:25 +01:00
Adrian Sampson
290162a7eb Merge pull request #2294 from anshuman73/master
Fixed #2200 and a small typo
2017-06-10 20:50:50 -04:00
Jeffrey Aylesworth
8638157e17 Change license and email address in mbcollection plugin. 2017-01-30 23:37:01 -05:00
anshuman73
430369062b Fixed a small typo 2016-11-29 00:28:38 +05:30
Adrian Sampson
5efd5b21c5 Use new as_str method
Instead of `get(six.text_type)`, which was a surprisingly large portion of our
uses of six.
2016-06-25 19:16:14 -07:00
Johnny Robeson
e8afcbe7ec replace unicode with six.text_type 2016-06-24 05:53:49 -04:00
Adrian Sampson
c18b5dbadd Fix #1907: redact MusicBrainz password 2016-03-11 16:50:32 -05: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
Adrian Sampson
d53019f9db Further whitespace fiddling
Most commonly, this sticks with:

    log.debug(
        'some long message here'
    )

instead of placing the closing ) at the end of the string literal.
2016-02-28 14:48:10 -08:00
Peter Kessen
48098c3741 Removed import of unicode_literals from plugins
* lastgenere
* mbcollection
* mbsubmit
* mbsync
* missing
2016-02-20 14:08:05 +01: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
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
Adrian Sampson
24317fd4c7 Rename BeetsPlugin._import_stages to import_stages
For #1208. Restores backwards-compatibility and matches the development docs.
2015-01-11 14:27:59 -08:00
Bruno Cauet
b2582c5d62 MusicBrainz collection plugin: delete "print" uses 2015-01-06 21:42:34 +01:00
Bruno Cauet
32673b87e7 Update multiple plugins: pass the logger around 2015-01-06 21:42:09 +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
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
Adrian Sampson
02e341cded Fix #1152: mbcollection: choose release collection 2014-12-20 22:21:58 -05:00
Adrian Sampson
4b11eed79f Minor cleanup and changelog for #922 2014-08-27 10:55:16 -07:00
Olin Gay
3b82be1a23 Changes for issue -- mbcollection: Automatically update collection on import #793 2014-08-27 10:26:31 +05:30
Adrian Sampson
e5a9db1cac fix up some indentation warnings in plugins 2014-04-13 17:55:49 -07: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
Adrian Sampson
b3bc4d3622 mbcollection: skip invalid MBIDs 2013-09-13 19:13:36 -07:00
Adrian Sampson
7b7a4257ac mbcollection: use library functions
Since we now require python-musicbrainz-ngs 0.3 or later, we no longer have to
hand-craft the API requests.
2013-03-11 19:43:57 -07:00
Adrian Sampson
1fbbe61546 mbcollection: human-readable MB exceptions
Fixes #107 by wrapping the API invocation function with exception handlers.
2013-02-28 10:43:02 -08:00
Adrian Sampson
3ef9e006f4 finish confit-ifying all the plugins 2012-12-13 17:14:19 -08:00
Adrian Sampson
f2ab26d6a4 mbcollection: change chunk size to 200 releases 2012-10-14 20:35:03 -07:00
Adrian Sampson
429af42e14 use print_function __future__ import
All code should now use Python 3-style "print"s.
2012-05-13 21:08:27 -07:00
Adrian Sampson
8b25a86ee3 use 2.6-compatible format strings 2012-05-08 11:46:08 -07:00
Adrian Sampson
2466305d7e add MusicBrainz collection plugin by @jeffayle 2012-03-23 11:34:57 -07:00