Kier Davis
eb85ff422b
convert plugin: fix braces in filenames causing tracebacks in "pretend" mode
...
Previously "pretend" mode (a.k.a. dry run mode) passed the command to be
printed directly to _log.info, whose first argument is technically a
format string. Thus the command string was parsed for replacement fields, such
as '{foo}', which could cause the format evaluation to fail if the filenames
contained in the command contained valid (or partially valid) replacement fields.
This fix simply inserts an argument '{0}' to the call to _log.info, which is a
format string that simply evaluates to the second argument to _log.info (the
command string). By doing this, the command string is not parsed for replacement
fields.
2016-12-16 00:21:35 +00:00
nath@home
2e78628507
convert: Don't ask for confirmation if query result is empty
2016-11-13 17:46:29 +01:00
nath@home
d53b677e0f
convert: initial cleanup of convert_func
...
Get cli options and configuration in a more readable, uniform way
2016-11-13 00:20:01 +01: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
304df82361
rename/move ui._arg_encoding to util.arg_encoding
...
We use this for more than ui concerns, so it should be in util.
It is also no longer marked as a "private" method.
2016-08-04 17:16:11 -04:00
Johnny Robeson
1b103b087b
reencode convert args on py3 for util.command_output
...
command_output requires bytestrings, so we put em back that way.
2016-07-25 04:57:02 -04:00
Johnny Robeson
e5497c7494
use stringed template vars on PY3 in convert plugin
...
We decode them with `surrogateescape`, so we avoid decoding errors
2016-07-25 03:28:02 -04:00
Johnny Robeson
5107f2e6d2
add missing py3_path to tempdir in convert plugin
2016-07-10 04:59:58 -04:00
Johnny Robeson
3db81a3345
bytestringify tmpdir in convert plugin
...
This works fine in py 3.5, but not 3.4
2016-07-09 03:50:16 -04:00
Johnny Robeson
1119e219b3
adjust bytestring treatment of ext in convert plugin
2016-07-07 03:44:19 -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
cf5ab2617a
reorient bytestring_path code in convert replace_ext
2016-06-17 01:20:42 -04:00
Johnny Robeson
411e4957b0
bytestringify replace_ext in convert plugin
2016-06-16 23:40:59 -04:00
Adrian Sampson
b752a58ed6
Improve a couple of docstrings
2016-06-05 12:16:41 -07:00
Adrian Sampson
33a4767eaf
Portable mock command for testing convert plugin
2016-05-31 11:48:29 -07:00
Johnny Robeson
81484529c9
remove b' from a few more stdlib calls
2016-05-31 00:13:09 -04:00
Adrian Sampson
ef7cca4c12
Fix #2005 : list AIFF as a lossless format
2016-05-18 11:24:34 -07:00
Jack Wilsdon
5f3c27990d
Merge pull request #1974 from jackwilsdon/make-convert-extension-optional
...
Make convert extension optional
2016-05-08 16:30:30 +01:00
Profpatsch
2d36626d25
convert plugin: Change the default ogg quality
...
According to the `oggenc(1)` man page (in vorbis-tools), the default quality is 3, not 2. So we should use that.
2016-05-02 01:53:20 +02:00
Patrik
2f608fce0a
convert.py: Fix error message
2016-05-01 01:53:03 +02:00
Patrik
4f596725ae
convert.py: Fix error message
2016-05-01 01:27:02 +02:00
Jack Wilsdon
ae9ece1e62
Make format extension optional
...
The format extension defaults to the name of the format if it is not
provided.
2016-04-29 14:51:13 +01:00
Guilherme Danno
019d7cd2e6
fix some typos
2016-04-18 12:36:42 -03:00
Adrian Sampson
eac7d64545
Merge branch 'master' into no_unicode_literals
2016-02-28 15:21:43 -08: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
031d50abbf
Human-readable message in non-pretend mode ( #1894 )
2016-02-27 09:58:05 -08:00
Ali Graham
a98bc481cd
tweaks for style, option name
2016-02-27 19:05:56 +10:30
Ali Graham
a1f80275c4
revert a chunk of the work to be the way it was
2016-02-25 21:35:14 +10:30
Ali Graham
bc21afab42
better text for artwork resize/copy logs
2016-02-25 18:51:00 +10:30
Ali Graham
1fc6efe3b4
fix indentation
2016-02-25 18:45:53 +10:30
Ali Graham
04c12a50ac
add copy_album_art_maxwidth config option to convert plugin
2016-02-25 12:44:56 +10:30
Peter Kessen
40900aa1cb
Removed unicode_literals from plugins
...
* bucket
* chroma
* convert
* discogs
2016-02-20 12:10:01 +01:00
Jack Wilsdon
12cd5306b7
Update copyright dates to 2016
2015-12-30 15:42:06 +00:00
Adrian Sampson
eb68177fee
Fix #1735 : convert --pretend encoding error
2015-11-21 12:40:45 -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
Adrian Sampson
c617033476
convert: Add some comments
2015-11-01 11:01:40 -08:00
Adrian Sampson
5f5a8946c3
convert: Debug log when embedding images
...
To help diagnose #1671 .
2015-10-30 15:25:01 -04:00
Giorgos Logiotatidis
4a8f978f4c
[convert] Fix dest and format flags help text.
2015-05-25 14:37:38 +03:00
Adrian Sampson
07242f65e2
Convert always uses bytestring args ( #1461 )
2015-05-19 16:38:08 -07:00
Adrian Sampson
0af2cdaa3a
New beets.art image utilities
...
This makes it cleaner to share the high-level image-embedding logic between
the `embedart` and `convert` plugins. This resolves a regression, introduced
in f504c786 , that inadvertently activated the former plugin when the latter
was enabled. I also like avoiding cross-plugin imports.
2015-04-05 12:15:38 -07:00
Mara Kim
ddca1b2e13
Add 'tmpdir' option to convert plugin
...
Closes sampsyo/beets#1382
Add tmpdir setting
document tmpdir setting
2015-03-27 02:11:33 -05:00
Bruno Cauet
7798a521b5
Fix convert plugin
2015-03-05 17:40:32 +01:00
Bruno Cauet
650305c9a1
All suitable plugins use CommonOptionsParser features
2015-03-05 17:03:02 +01:00
Bruno Cauet
6234fee67d
Option parser: add common options with a method
...
Add a new OptionParser subclass: CommonOptionsOptionParser, which
provides facilities for adding --album, --path and --format options. The
last one is quite versatile.
Update base commands (from beets.ui.commands) to use those.
2015-03-05 15:01:20 +01:00
Bruno Cauet
d267741ff3
Delete 'format' variables that shadow the built-in
...
Also cleanup the 'the' plugin a bit: delete unused variables.
Relates to #1300 .
2015-02-11 16:26:16 +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
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