Zsin Skri
30395911e2
util.command_output: return stderr, too
...
Return a namedtuple CommandOutput(stdout, stderr) instead of just stdout from
util.command_ouput, allowing separate access to stdout and stderr.
This change is required by the ffmpeg replaygain backend (GitHub
PullRequest #3056 ) as ffmpeg's ebur128 filter outputs only to stderr.
2019-07-14 18:32:59 +02:00
Constantine Evans
dd2b44ef20
minor fixes and changelog entry
2017-12-11 13:31:40 -08:00
Constantine Evans
c9b4e9b414
only use tiebreak if tiebreak includes an entry for the kind being considered, otherwise use default (eg, if only items is specified, and -a is being used, use default order of priority
2017-12-10 12:28:47 -08:00
Jonas Wagner
114a6f80da
Fix the --key option in the duplicates plugin.
...
During a refactoring, the "dest='keys'" parameter was lost. This caused
the option to not have any effect.
2017-09-22 20:27:47 +02:00
zigarrre
b376139663
Refactored move functions for clarity according to #2682
...
The move functions in library.py and manipule_files in importer.py where
changed to use a single parameter for the file operation instead of
multiple boolean flags.
A typo in the documentation of the Album.move and Item.move functions
confusing True and False when describing the store parameter was fixed
as well.
2017-09-11 17:03:44 +02:00
wordofglass
bb5629ea1d
Remove untyped except statements
2017-04-29 00:05:20 +02:00
Adrian Sampson
77a6b0edf8
duplicates: Fix 2nd bug in #2444 about path types
2017-02-21 22:00:31 -05:00
Adrian Sampson
d00c0fb5cf
Replace varargs_callback in duplicates
...
Now you just use `-k KEY1 -k KEY2`, which seems more natural to me anyway.
2016-09-10 05:13:06 -04:00
Adrian Sampson
ed8d04f594
Unicode templates in duplicates ( fix #2188 )
2016-09-07 21:04:05 -04:00
Johnny Robeson
4c4d8cff60
s/get(list)/as_str_seq() for keys in duplicates plugin
...
stolen from @sampsyo in the click branch
2016-08-17 02:18:48 -04:00
Adrian Sampson
e16cc58cb9
Walk back some six.iter* uses
...
In places where it doesn't much matter whether we use an iterator or the old
Python 2 list way, using the six name just hurts legibility.
2016-06-25 18:29:55 -07:00
Johnny Robeson
edb1cbc5fc
replace iter{items|values} with six.iter{items|values}
2016-06-24 05:53:55 -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
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
5547a82848
Removed unicode_literals from plugin duplicates
2016-02-20 13:26:27 +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
7d52fa72ae
Fix #1699 : Outdated API call
...
get_fields() was removed in 5420599839 .
2015-11-04 20:25:17 -08:00
Adrian Sampson
f6ecbf659f
Silly oversight in fix for #1551
2015-07-28 22:39:53 -07:00
Adrian Sampson
ebf98d7bf0
duplicates: Avoid Unicode-to-bytes comparison
...
Fix #1551 .
2015-07-28 22:36:27 -07:00
Adrian Sampson
5420599839
New all_keys() method on dbcore.Model
...
Rather than the ad-hoc one on library classes. This also avoids some confusing
duplication in the `beet fields` output, at the cost of turning off the plugin
distinction.
2015-07-28 22:27:43 -07:00
Pedro Silva
3be593693d
add merging functionality to duplicates plugin
...
This patch depends on %aunique not being present in config.paths
for behavior as intended.
The logic surrounding moving/copying a track from a duplicated album to
the original one could probably be extracted out and put into
library.Album.
This is based on the ordering imposed by the tiebreaking facility
introduced in 6be98b0a36 . Once a natural
duplicate ordering is in place, then the strategies for merging are:
Items:
Iterate through each available field:
Iterate through each duplicate:
If current duplicate has a field not set in the original, set it there
Break
Albums:
Iterate through each duplicate:
Iterate through each item in duplicate:
If current item is not present in original, copy it there
Continue
2015-05-25 18:12:06 +02:00
Pedro Silva
0377510522
handle albums during default attribute set completeness sorting
2015-05-17 23:56:10 +02:00
Pedro Silva
684f4deadc
fix typo during tagging: option -t now actually works
2015-05-17 15:01:48 +02:00
Pedro Silva
6be98b0a36
add tiebreaking facility
2015-05-16 19:25:47 +02:00
Pedro Silva
834418de6d
fix #1457 : enforce correct config typing
2015-05-15 11:48:27 +02:00
Pedro Silva
82ce6f054d
make helper functions methods in plugin
...
This helps use the _log attribute that is now available
2015-03-28 10:08:07 +01:00
Pedro Silva
9999460cb4
hash attribute values as tuples instead of stringifying on SOH char
2015-03-27 11:48:51 +01:00
Pedro Silva
fb0e03dd6b
remove redundant plugin name from logging
2015-03-27 11:47:40 +01:00
Pedro Silva
66e06baca7
fix #1000 : provide --strict option (don't match on null attributes)
2015-03-27 11:34:45 +01:00
Bruno Cauet
650305c9a1
All suitable plugins use CommonOptionsParser features
2015-03-05 17:03:02 +01:00
Tom Jaspers
50dbd18493
Duplicates: fix error caused by formatting
...
Function arguement `format` was shadowing the built-in format function
Fix #1300
2015-02-03 13:31:54 +01: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
4e904c78af
Simplify LibModel format management
...
Delete `ui.format_` and then `ui.print_obj`. Simply ensure that when
there is no format it defaults to '' = default format = config option.
2015-01-26 23:09:56 +01:00
Bruno Cauet
62cd6e37aa
Update ui.print_obj_(), add ui.format_()
...
Code now relies on `format()` for items and albums displaying/logging.
`ui.print_()` calls `unicode()` or `str()` on the strings so for most
usages calling `ui.print_(obj)` replaces `ui.print_(obj, lib, None)`.
Where there is a special format `ui.print_(format(obj, fmt))` is fine,
but when `fmt` can be None then one has to call
`ui.print_(ui.format_(obj, fmt))` -- which is what `ui.print_obj` now
does.
2015-01-25 21:07:03 +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
02d8e88ef1
Replace all mentions of 'str' with 'bytes'
2015-01-20 12:48:15 +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
32673b87e7
Update multiple plugins: pass the logger around
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
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
Adrian Sampson
0749d4716c
duplicates: Fix #999 (check "checksum" type)
2014-10-11 12:28:41 -07: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
Fabrice Laporte
3ead936fe5
flake8 cleaning beetsplug/*
...
Remaining warnings are related to visual indentation.
2014-04-13 23:24:57 +02:00