Commit graph

142 commits

Author SHA1 Message Date
Rainer Hihn
b7d3ef6274 - Improved doc and changelog
- Cleaner implementation of mutual excursion of the command line
arguments.
2019-04-21 18:32:41 +02:00
Rainer Hihn
ddd7b4b3b4 Removed empty line 2019-04-19 21:17:15 +02:00
Rainer Hihn
5c643a8f16 Removed ipdb import 2019-04-19 21:08:26 +02:00
Rainer Hihn
e4b2e7b476 Made -a and -A mutually exclusive. 2019-04-19 20:58:13 +02:00
Rainer Hihn
0b2334f8e8 Added command line options to query explicit for albums and / or tracks. 2019-04-18 22:31:49 +02:00
rain0r
fc95fb86a1
Update __init__.py
Also fetch genres for single tracks via query.
2019-04-17 20:57:58 +02:00
Adrian Sampson
63b7ede4f7 Merge pull request #3054 from discopatrick/2704-lastgenre-force
WIP: Remove `default` arg for `lastgenre --force` flag
2019-04-06 13:49:07 -04:00
Alexei Datskevich
be12a89372 Fix PyYAML yaml.load(input) Deprecation 2019-03-30 08:34:13 +01:00
Patrick Heneghan
9c7a313b0d
Remove default arg for lastgenre --force flag 2018-10-16 18:51:39 +01:00
Zsin Skri
ceabc72feb lastgenre: remove unnecessary check
In _resolv_genres wo do not have to explicitly check if self.c14n_branches is
not empty. The tree will have been loaded when self.canonicalize is truthy. Also
if self.c14n_branches would be empty the canonicalization is a no-op anyway...
2018-07-01 09:15:05 +02:00
Zsin Skri
cef9a3311c LastGenre: allow prefer_specific without canonical
This improves lastgenre's behaviour when the configuration option
`prefer_specific` is set but `canonical` is not.
Previously it would not set any tags. Now it does apply tags, sorted using the
canonicalization tree, but not canonicalized.

For this the default tree is loaded even when `canonical` is not set.
An extra check is added to only use it for canonicalization when `canonical` is
set.
2018-06-30 22:27:29 +02:00
Jakub Turski
ee46a5150f Don't crash if non-canonical genre and prefer_specific: yes.
Also, add a test for this.
2017-06-02 15:48:05 +01:00
Adrian Sampson
4ae02e0d27 Merge pull request #2211 from heylookltsme/better-genre
Proposal: Add specificity option to lastgenre plugin
2016-09-27 09:07:39 -04:00
Corinne Hoener
a7e3bf2d0b third time's a charm 2016-09-27 06:21:51 -04:00
Corinne Hoener
1c9202cc86 moar indents! 2016-09-26 21:21:15 -04:00
Corinne Hoener
c10fe1e126 change option name to prefer_specific 2016-09-26 19:06:34 -04:00
Corinne Hoener
be5ce3194f better syntax; better comments 2016-09-26 19:02:10 -04:00
Corinne Hoener
288ff6ba19 Add specificity option to lastgenre in order to prefer the most specific genres 2016-09-26 16:13:04 -04:00
Johnny Robeson
7a2bdf502f s/utf8/utf-8/ in all encoding/decoding contexts
This matches up with the python documentation.
2016-09-06 23:10:24 -04:00
Johnny Robeson
d41949d326 close files we open, but forgot to close
This fixes all the obvious `ResourceWarning`s seen in the tests
2016-08-09 01:15:28 -04:00
Johnny Robeson
01483f9600 change most googlecode refs to their new locations 2016-07-27 02:57:04 -04:00
Johnny Robeson
1da919bc40 open lastgenre genres file with codecs.open()
This should fix an error when decoding the file on Windows. It defaults
to using the code page there and not utf-8 as intended for yaml.
2016-07-17 06:57:38 -04:00
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
Johnny Robeson
02165fc3a9 open lastgenre whitelist in binary mode 2016-06-09 23:53:40 -04:00
Johnny Robeson
81484529c9 remove b' from a few more stdlib calls 2016-05-31 00:13:09 -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
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
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
Manfred Urban
57faf015d9 Adapted va_name in other files 2015-11-08 17:28:55 +01:00
Adrian Sampson
9f7aa866bd Use ui.should_write everywhere
There sure are a lot of plugins that want to write metadata!
2015-11-07 13:20:09 -08:00
Adrian Sampson
4038f191da Fix #1564 (regression from #1559) 2015-08-08 11:23:55 -07:00
Sven Oos
74f58e7b3c Bugfix:
Items had not been filtered. Converting the tags' weight into an integer solves it.
2015-08-03 23:46:50 +02:00
Adrian Sampson
90178ab380 Always log a template literal (fix #1481)
Otherwise, we risk the user-provided string looking like a format string! If
it contains curly braces, it can behave unexpectedly.
2015-05-28 23:44:41 -04:00
Adrian Sampson
f6df14a798 Isolate bugs in pylast
Should fix crashes like this:
http://hastebin.com/nizusukuli.log
2015-03-14 15:13:07 -07:00
Adrian Sampson
b8dab9cf9f Merge pull request #1247 from brunal/future
Use all __future__ imports in beets core

Conflicts:
	beetsplug/web/__init__.py
	test/test_embedart.py
2015-01-26 17:02:07 -08:00
Bruno Cauet
8165dec985 Delete manual formattings of album & item 2015-01-25 21:32:22 +01:00
Bruno Cauet
132f5ba912 Fix bytes/str with unicodenazi 2015-01-20 16:41:18 +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
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
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