Cody W. Opel
d384b07914
fromfilename: fix dict view conversion for python3 ( fix #2195 )
...
dict.values() returns a view rather than a list in python3
2016-09-12 09:29:32 -04: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
f8a8388e0c
Avoid using None when format is unspecified
2016-09-07 21:47:31 -04:00
Adrian Sampson
15a5512ea5
Require Unicode format strings
...
Fallout from #2188 . Following @jrobeson's suggestion, I just turned the check
in LibModel.__format__ into an assert. This turned up a few badly-behaved
clients, which are also fixed.
2016-09-07 21:42:59 -04:00
Adrian Sampson
ed8d04f594
Unicode templates in duplicates ( fix #2188 )
2016-09-07 21:04:05 -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
nathdwek@laptop
3acd44260a
Apply #2175 to mpdstats to keep consistency
2016-08-26 18:17:37 +02:00
Thiago de Arruda
9963fd0432
mpdupdate: Support $MPD_HOST environment variable.
...
This environment variable is also used by mpc. See
http://linux.die.net/man/1/mpc for details.
2016-08-26 11:36:39 -03:00
Marvin Steadfast
5592499b31
embyupdate: backwards compatible hostname
...
`host` takes `localhost`, `http://localhost ` and `https://`.
2016-08-26 12:28:48 +02:00
Marvin Steadfast
a282d4abc5
embyupdate: Fix authentication header problem
...
There was a problem with the authentication header in the latest
versions. The header creation function changed to fix that. Username and
passwort authentication should work again.
The `host` config variable takes now a full hostname. For example
`http://localhost ` instead of just `localhost`. This makes it easier to
use https hosts.
2016-08-26 10:29:08 +02:00
Johnny Robeson
6bedbd84df
removebyte conversion/literals for command args
...
Paths are obviously untouched.
We definitely don't need these as they are entirely ascii.
2016-08-25 03:37:30 -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
0833c82075
web: Fix a crash related to byte paths on Python 3
2016-08-12 19:59:07 +00:00
arogl
86d2129c52
Spelling update
2016-08-12 14:48:55 +10:00
Johnny Robeson
fb78830788
fix incorrect bytes() usages in replaygain
...
We encode the method and gain offset values to ascii.
2016-08-09 05:17:53 -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
fcbfce3984
replace deprecated log.warn() with log.warning()
2016-08-09 00:33:38 -04:00
Johnny Robeson
47bddb394c
decode yaml dumped data as utf-8 in edit plugin for PY2
...
Yaml doesn't return a true unicode string even with `allow_unicode`
passed to `safe_dump_all`.
2016-08-08 23:59:54 -04:00
Johnny Robeson
303627e44f
Read and write edit plugin yaml as utf-8
2016-08-07 06:12:48 -04:00
Johnny Robeson
5b3cd44608
add coding: utf-8 magic comment to every .py file
2016-08-07 04:09:17 -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
Adrian Sampson
e2981dec4a
Merge pull request #2143 from Jell-E/patch-1
...
Add BPM data with acousticbrainz
2016-07-27 14:58:10 -04:00
Adrian Sampson
c241f09bce
Tiny text tweaks for #2144
2016-07-27 14:56:55 -04:00
Adrian Sampson
6f99c4ccd9
Merge pull request #2144 from tweitzel/master
...
fix bug where $args would be included in the command output
2016-07-27 14:55:20 -04:00
xarph
be7c9d3b67
Remove unneeded if clause since .format will silently pass if the needle
...
is not found.
Add changelog note.
2016-07-27 11:23:37 -07:00
Adrian Sampson
5e3bbf2aeb
Remove remaining links to Google Code ( fix #2145 )
2016-07-27 13:32:41 -04:00
Johnny Robeson
01483f9600
change most googlecode refs to their new locations
2016-07-27 02:57:04 -04:00
xarph
349a3260f8
Apparently py34-flake8 wants whitespace around operators.
2016-07-26 16:08:52 -07:00
xarph
9fb763e151
fix bug where $args would be included in the command output if $args was
...
set in config but -A or --args was left off the beet play command.
2016-07-26 15:41:45 -07:00
Jelle Besseling
b4caa0e475
Add BPM data with acousticbrainz
...
The bpm plugin is a very slow way to add bpm data to songs, using the acousticbrainz plugin is much faster and can doesn't need a new plugin.
2016-07-26 15:42:35 +02:00
Adrian Sampson
58afaf07a5
Switch to new noqa syntax for flake8 3.0
...
Apparently, `# noqa ignore=X` worked before, but now the syntax is more terse,
like this: `# noqa: X`.
See the changelog here:
http://flake8.pycqa.org/en/latest/release-notes/3.0.0.html
2016-07-25 15:02:10 -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
Adrian Sampson
039825e0e0
Only use CodingFormatter on Python 2
2016-07-24 15:01:06 -07:00
Adrian Sampson
c67fbefc4c
A little more spcificity in CodingFormatter
2016-07-24 14:59:31 -07:00
Rob McGhee
84b8cf0ab5
Merge remote-tracking branch 'refs/remotes/beetbox/master'
2016-07-20 21:13:32 +01: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
Johnny Robeson
a1edf1928d
treat bpd command and args as strings, not bytes
2016-07-10 19:21:52 -04:00
Johnny Robeson
f82f5f51a4
use !r for command exec logging in play plugin
...
This is a bit simpler and is compatible with py2 and 3.
2016-07-10 06:00:53 -04:00
Johnny Robeson
5107f2e6d2
add missing py3_path to tempdir in convert plugin
2016-07-10 04:59:58 -04:00
Johnny Robeson
17883bc501
replace os.symlink() with util.link() in importfeeds
2016-07-09 22:44:26 -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
cb6efc4c22
Reorganize Gst import and version req in bpd
...
This avoids
```sh
PyGIWarning: Gst was imported without specifying a version first. Use
gi.require_version('Gst', '1.0') before import to ensure that the right
version gets loaded.
```
by silencing E401 import ordering warning
2016-07-08 05:48:26 -04:00
Rob McGhee
2dad86291e
Emby API Key
...
Corrected the use of spaces rather than tabs. Add the option to use an
Emby API key to authenticate rather than a password
2016-07-07 22:46:33 +01:00
Johnny Robeson
c9c37a8f79
adding missing b' to command name checks in replaygain
2016-07-07 03:44:19 -04:00
Johnny Robeson
1119e219b3
adjust bytestring treatment of ext in convert plugin
2016-07-07 03:44:19 -04:00
Rob McGhee
3710c139fb
Emby API Key
...
Add the option to read an API Key from the config file and submit that
instead of needing a password. Doesn't remove the use of password so is
backwards compatible with users current config file
2016-07-06 19:42:57 +01:00
Johnny Robeson
a15ae96616
add a missing text_string in play plugin
...
I don't think wanna send the cli args as bytes to the logger
2016-07-04 02:48:54 -04:00
Johnny Robeson
b9cd889ef4
decode ipfs item paths to satisy python -bb
2016-07-03 23:52:05 -04:00
Johnny Robeson
527b51147e
add py3_path to NamedTemporaryFile suffixes
2016-07-02 04:53:57 -04:00
Johnny Robeson
be08d4b129
replace unichr with six.unichr in lyrics plugin
2016-07-02 02:36:05 -04:00
Johnny Robeson
9020dc1f45
use text_string() in a few places for io output
2016-07-02 00:03:46 -04:00
Johannes Baiter
4c324fae2a
beatport: Use track numbers from API ( #2091 )
...
* beatport: Use trackNumber from API instead of enumerating the tracks
* beatport: Set medium_index to track number
* Update changelog with fixes to beatport plugin
2016-06-29 20:34:05 +02:00
Adrian Sampson
a6098928f5
Merge branch 'master' of github.com:sampsyo/beets
2016-06-29 10:33:00 -07:00
wordofglass
e2c6547635
fetchart: Clarify the deprecation of remote_priority in docs and
...
warning, closes #2092
2016-06-29 19:18:06 +02:00
Johnny Robeson
6b3cc6ff37
adapt print_() callers to send unicode strings
2016-06-29 03:17:02 -04:00
Adrian Sampson
192dd321f1
permissions: Add debug logging
2016-06-28 10:53:23 -07:00
Adrian Sampson
890b9e81e3
Fix #2089 : correct permissions configuration
...
This reverts the change in 44380db6e8 , where we
lost the ability to "reinterpret" decimals in the YAML configuration file as
octal permissions values.
2016-06-28 10:51:13 -07:00
Adrian Sampson
84bfbe95b9
permissions: More helpful logging ( #2089 )
2016-06-28 10:39:35 -07:00
Adrian Sampson
b099503a6c
permissions: Use correct path conversions
...
It looks like the original author mistook `bytestring_path` for `syspath`.
2016-06-28 10:31:57 -07:00
Adrian Sampson
e33c19a3e9
permissions: Use proper logging ( #2089 )
...
Refactored so we can use the proper logging infrastructure instead of `print`.
2016-06-28 10:29:26 -07:00
Christoph Reiter
629241efd3
mediafile: Cleanup mutagen error handling
...
Instead of the individial mutagen format exceptions use the
mutagen.MutagenError exception introduced in 1.25.
Since 1.33 mutagen will only raise MutagenError for load/save/delete
and no longer raise IOError. Translate both errors to UnreadableFileError
to support older and newer mutagen versions. Unify error handling
in __init__(), save() and delete().
Since it's no longer possible to get an IOError from MediaFile, adjust
all callers and tests accordingly.
This was tested with mutagen 1.27 and current mutagen master.
2016-06-28 16:43:34 +02:00
Max Ammann
5e8ac9e4a5
Expose the relative path to the library instead of omitting the 'path' variable
2016-06-26 19:53:57 +02:00
Max Ammann
2ae26548fc
Modified and simplified is_expand(...) method
2016-06-26 19:53:57 +02:00
Max Ammann
619344c813
Added documentation for the expand parameter
2016-06-26 19:53:57 +02:00
Max Ammann
041adf47ac
Fixed lines which are mor than 79 characters
2016-06-26 19:53:57 +02:00
Max Ammann
5831b99b9f
Adding 'expand' flag for json requests
...
This allows you to query the individual items of an album
2016-06-26 19:53:57 +02:00
Adrian Sampson
a8b039da78
Remove a spurious six use
...
I'm not sure what that `encode` was doing anyway.
2016-06-25 19:24:59 -07: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
Adrian Sampson
de62a59d35
Remove an unnecessary six.range use
...
Ordinary `range` works fine here.
2016-06-25 18:39:29 -07: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
Adrian Sampson
349a6e6c1d
Fix an erroneous six usage in fuzzy
2016-06-25 18:11:15 -07:00
Adrian Sampson
736ad66518
Merge pull request #2066 from beetbox/use-six
...
Use the six package to handle py2/p3 compatibility
2016-06-25 18:09:56 -07:00
wordofglass
5d00ca8bda
fetchart: do not unnecessarily reset Candidate.path on download failure
2016-06-25 14:10:55 +02:00
wordofglass
697291b04e
fetchart: improve error resilience of the Content-Type detection by file magic
2016-06-25 14:10:50 +02:00
wordofglass
9968288358
fetchart: update comments
2016-06-25 13:49:15 +02:00
Johnny Robeson
b6678019ea
use @six.python_2_unicode_compatible
2016-06-24 05:53:56 -04:00
Johnny Robeson
78334876c3
treat HTMLParseError as a noop when missing
...
Strict mode no longer exists in html.parser on python >= 3.5, and no longer means anything on python >= 3.3
2016-06-24 05:53:56 -04:00
Johnny Robeson
edb1cbc5fc
replace iter{items|values} with six.iter{items|values}
2016-06-24 05:53:55 -04:00
Johnny Robeson
83f6ba3ce4
handle metaclasses with six
2016-06-24 05:53:55 -04:00
Johnny Robeson
e57b7faf69
replace basestring with six.text_types
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
wordofglass
34cdf0f3f3
fetchart: complain about unsupported images only after validating the Content-Type
2016-06-23 17:38:01 +02:00
wordofglass
d47182a3e5
fetchart: do not rely on the server-provided Content-Type, but determine the image format from the file magic
2016-06-23 17:37:55 +02:00
Johnny Robeson
8e682f14a1
replace xrange with range from six.moves
2016-06-23 04:40:18 -04:00
Johnny Robeson
31cca684f2
replace itertools.izip with zip from six.moves
2016-06-23 04:40:18 -04:00
Johnny Robeson
1f8e08d168
replace raw_input with input from six.moves
2016-06-23 04:40:18 -04:00
Johnny Robeson
4649226b9b
use urllib from six.moves
2016-06-23 04:40:18 -04:00
Johnny Robeson
1f8fe0f9a6
use _thread from six.moves
2016-06-23 04:40:18 -04:00
Johnny Robeson
129e140015
use html_parser (really html.parser) from six.moves
2016-06-23 04:40:18 -04:00
Johnny Robeson
7713be4c0f
use http_client (really http.client) from six.moves
2016-06-23 04:40:18 -04:00
Johannes Baiter
ed2580d5b1
Fix bugs in beatport plugin ( #2076 )
...
* Fix naming bug
* Fix another minor bug
* Remove debugger statement
* Another fix for developer clumsiness in beatport plugin
* Fix typo in error description
2016-06-23 08:51:26 +02:00
Johnny Robeson
ea02269dee
remove ext encode from fetchart (py3 fix for #2068 )
2016-06-23 02:29:53 -04:00
Adrian Sampson
d3928008e1
Merge pull request #2068 from beetbox/fetchart_mime_extension
...
Fix fetchart hardcoding the image extension
2016-06-22 10:19:12 -07:00
Adrian Sampson
5e7ba73f5e
Merge pull request #2067 from jbaiter/beatport
...
Revive Beatport plugin with support for OAuth API (#1989 )
2016-06-21 14:33:34 -07:00
Adrian Sampson
351b6f8c9d
Remove raw Unicode literals ( fix #2069 )
...
PEP 414 didn't add `ur"..."` literals to Python 3. So for hybrid 2/3
compatibility, these had to be replaced with ordinary Unicode string literals.
This was only painful for one string; the others were only raw strings by
convention. (All were regexes.)
2016-06-21 14:29:14 -07:00
Johannes Baiter
ae0269372c
Docstrings for beatport.BeatportClient
2016-06-21 21:39:25 +02:00
Johannes Baiter
c4835336a5
Fix PEP8 checks
2016-06-21 11:20:16 +02:00
Johannes Baiter
85d6ef4a80
Revive Beatport plugin with support for OAuth API ( #1989 )
2016-06-21 11:02:16 +02:00
wordofglass
c4617c2c1f
fetchart: do not hardcode the downloaded extension to jpg, fixes #2053
2016-06-21 10:57:45 +02:00
Philipp Beckmann
f9ed53a096
Multiple corrections as advised in the codereview
2016-06-20 18:44:37 +02:00
Philipp Beckmann
7b154cedd7
Added double line spacings between definitions
2016-06-20 18:29:46 +02:00
Philipp Beckmann
9fd227c8cc
Fixed flake8 errors
2016-06-20 18:22:07 +02:00
Philipp Beckmann
0a3d18c5c4
Merge remote-tracking branch 'upstream/master' into bpd_gst10
2016-06-20 18:11:11 +02:00
Philipp Beckmann
5613d9d4ea
bpd: Added correct error check for query_position/query_duration
2016-06-20 18:09:37 +02:00
Johnny Robeson
09322530ca
replace 2 map() calls with a list comprehension
2016-06-19 22:30:58 -04:00
Philipp Beckmann
0917e675d7
bpg: Converted gstplayer.py to GStreamer 1.0
2016-06-19 22:06:55 +02:00
Johnny Robeson
1c761c60fb
bytstringify extra cover_names in fetchart
2016-06-17 03:37:28 -04:00
Johnny Robeson
cf5ab2617a
reorient bytestring_path code in convert replace_ext
2016-06-17 01:20:42 -04:00
Johnny Robeson
fff0439b06
add missing blank line in mpdstats
2016-06-17 00:09:22 -04:00
Johnny Robeson
12136e1d32
adapt is_url checking for bytestring paths
2016-06-17 00:00:08 -04:00
Johnny Robeson
411e4957b0
bytestringify replace_ext in convert plugin
2016-06-16 23:40:59 -04:00
Johnny Robeson
b602faabb8
more bytestringification in thumbnails plugin
2016-06-16 23:11:16 -04:00
Johnny Robeson
15c07613bf
decode the filename written to .desktop file
2016-06-16 23:04:52 -04:00
Johnny Robeson
52f2ab2547
encode uri passed to hashlib in thumbnails plugin
2016-06-16 23:00:45 -04:00
Johnny Robeson
a903b57dae
encode the passwords passed to hashlib in embyupdate
2016-06-16 21:47:10 -04:00
Johnny Robeson
d3d52da012
bytestringify paths in filefilter plugin
2016-06-16 04:08:49 -04:00
Johnny Robeson
cb54955485
more bytecasting in smartplaylist plugin
2016-06-15 23:55:17 -04:00
Johnny Robeson
a02a1f0201
cast year ints to str, not bytes in bucket plugin
...
This seems to work equally well in py2/3
2016-06-15 03:34:03 -04:00
Johnny Robeson
4fbad7dd67
bytestringify path in file_filter
2016-06-14 23:17:08 -04:00
Johnny Robeson
44380db6e8
If the permission is an int, then simply return it
...
It doesn't seem necessary to convert it, and if it does, then
we're missing a test
2016-06-14 03:50:29 -04:00
Johnny Robeson
8e1bc16228
set default perms as strings in perms plugin itself
...
I originally changed them to octal in my py3 branch,
but they are gonna end up as strings anyways, so I figured we should
just use them that way by default.
2016-06-14 03:47:59 -04:00
Johnny Robeson
0a5c6ce4c0
open tempfile in edit plugin in text mode
2016-06-14 03:38:21 -04:00
Johnny Robeson
3112a18463
treat ctypes .value as bytes in thumbnails plugin
2016-06-14 00:51:12 -04:00
Johnny Robeson
8fa71f78fe
decode bytes from .encode() in lyrics plugin
2016-06-14 00:44:43 -04:00
Johnny Robeson
0f4b907ff5
wrap filter()s in a list() in replaygain plugin
2016-06-14 00:28:46 -04:00
Johnny Robeson
6745759ea5
open even more files in binary mode
...
* play plugin
* smartplaylist plugin
2016-06-13 05:18:33 -04:00
Johnny Robeson
4dd43f1081
write to the m3u file in binary mode in importfeeds
2016-06-12 20:27:01 -04:00
Johnny Robeson
a76de95183
return a bytestring path from RemoteArtSource
2016-06-12 01:19:39 -04:00
Johnny Robeson
69c9fb8b07
check dirname result against b'' in fetchart
2016-06-10 02:52:58 -04:00
Johnny Robeson
5e62b39f75
replace TEMPORARY with FIXME in discogs plugin
...
We're more likely to search for this later by FIXME.
NOTE: the bug is fixed, but the versions with the fix may not be widely
distributed yet
2016-06-10 02:30:00 -04:00
Johnny Robeson
5485bdb706
add missing b' in discogs query regex
2016-06-10 02:23:14 -04:00
Johnny Robeson
ab67727283
wrap the cover_names map with a list in fetchart
...
most `cover_names` users expect to operate on a list
2016-06-10 00:09:15 -04:00
Johnny Robeson
02165fc3a9
open lastgenre whitelist in binary mode
2016-06-09 23:53:40 -04:00
Adrian Sampson
f400a2431e
fetchart: Fix path types on Windows
2016-06-08 10:20:25 -07:00
Johnny Robeson
790b1b5153
replace some filter/map calls with list comps
...
These are places where the surrounding/calling code needs a list, not an iter.
2016-06-08 00:17:18 -04:00
Adrian Sampson
b752a58ed6
Improve a couple of docstrings
2016-06-05 12:16:41 -07:00
Adrian Sampson
0051bdb506
lyrics: Avoid a spurious warning
2016-06-02 21:33:33 -07:00
Adrian Sampson
ae7990322a
Merge pull request #2032 from pszxzsd/bs1770
...
make bs1770gain calculate sample peak instead of true peak
2016-06-02 16:17:04 -07:00
Adrian Sampson
581fba6288
lyrics: Avoid crash when enabling google
...
If you *both* haven't set an API key *and* BeautifulSoup wasn't
installed, the list.remove() call would crash. (This came up when
running the tests on a fresh machine without many dependencies.)
2016-06-02 11:58:14 -07:00
pszxzsd
8dcd50b18f
make bs1770gain calculate sample peak instead of true peak
2016-06-01 20:00:08 +02:00
Adrian Sampson
33a4767eaf
Portable mock command for testing convert plugin
2016-05-31 11:48:29 -07:00
Adrian Sampson
395877d903
Remove the Echo Nest plugin 😢 ( #1920 )
2016-05-30 22:25:58 -07:00
Johnny Robeson
81484529c9
remove b' from a few more stdlib calls
2016-05-31 00:13:09 -04:00
Johnny Robeson
330306bbe2
remove bytes casts from object/method resolution code
2016-05-30 23:21:24 -04:00
Johnny Robeson
e6ab231f72
Revert "Remove bytes casting for non-path command args/opts"
...
This reverts commit 2a6e74bc27 .
2016-05-30 22:00:42 -04:00
Johnny Robeson
2a6e74bc27
Remove bytes casting for non-path command args/opts
2016-05-30 21:42:44 -04:00
Johnny Robeson
94bab42f97
use strings (not bytes) for flask responder names
2016-05-30 21:19:15 -04:00
Adrian Sampson
71b9fd785c
Revert "Do __name__ comparison with bytes and not unicode"
...
This reverts commit 9c41c39913 .
That commit used byte strings for the `if __name__ == '__main__'` pattern,
which was necessary when we were doing unicode_literals. But it is wrong on
Python 3, and now that we're liberated from unicode_literals, we need to go
back to native strings for this comparison.
2016-05-29 19:19:59 -07:00
Adrian Sampson
59435792e9
Merge pull request #2010 from sumpfralle/web-api-unique-results
...
web: add API functions for retrieving unique values of specific keys
2016-05-27 00:15:34 -07:00
Johnny Robeson
a405a072f7
use reduce() from functools
2016-05-26 23:52:35 -04:00
Lars Kruse
d50923553d
web: add API functions for retrieving unique values of specific keys
...
the following API paths are added:
* /item/values/FIELD
* /album/values/FIELD
Both paths will deliver a json dictionary with the key 'values' containing a
list of unique values belonging to the requested table and field.
Sorting is possible by supplying the query argument "sort_key".
This feature is useful for remote clients, e.g. Mopidy-Beets:
* track genres: /item/unique/genre
* track languages: /album/unique/language
* album artists: /album/unique/albumartist?sort_key=albumartist_sort
* album years: /album/unique/year
2016-05-27 04:12:09 +02:00
Lars Kruse
be4dc227fc
web: handle missing art gracefully
2016-05-24 03:05:51 +02:00
Frederik “Freso” S. Olesen
37b9360706
acousticbrainz plugin: Access acousticbrainz.org over HTTPS.
2016-05-20 01:08:15 +02: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
Jack Wilsdon
fcce9c02ac
Revert removal of trailing comma
2016-05-06 17:51:21 +01:00
Jack Wilsdon
2d5c68cec9
Remove write option from bpm and use import.write
2016-05-06 17:50:27 +01:00
Jack Wilsdon
2038a40fa2
Add write option to bpm plugin
...
Add write option to bpm plugin and tidy up command function.
2016-05-05 11:27:28 +01:00
Jack Wilsdon
982272deb3
Merge pull request #1981 from jackwilsdon/fix-hook-unicode
...
Fix command formatting for hook plugin
2016-05-03 17:45:38 +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
Jack Wilsdon
92af723682
Format individual command pieces instead of whole command
2016-05-01 23:04:22 +01:00
Jack Wilsdon
9f0db13675
Remove unnecessary variable
2016-05-01 21:44:40 +01:00
Jack Wilsdon
63caf1fceb
Add documentation for coding formatter
2016-05-01 21:44:05 +01:00
Jack Wilsdon
ba7004de6e
Remove unneeded AutoFieldCountFormatter
2016-05-01 21:33:06 +01:00
Jack Wilsdon
e66981c4d8
Use beets shlex_split instead of shlex.split
2016-05-01 21:31:53 +01:00
Jack Wilsdon
b4715d61e1
Fix over-indentation of wrapped code
2016-05-01 21:30:20 +01:00
Jack Wilsdon
576ec92992
Fix encoding for hook plugin
...
- Add a AutoFieldCountFormatter formatter for auto field
incrementation.
- Add a CodingFormatter for formatting encoded strings.
- Fix encoding for hook plugin using CodingFormatter.
2016-05-01 21:21:40 +01:00
Adrian Sampson
04bbdede38
hook: Typed configuration accessors
2016-05-01 13:04:35 -07:00
Jack Wilsdon
b9464d1ea4
Use unicode for command formatting
2016-05-01 18:26:06 +01: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
Adrian Sampson
950e1b5e85
Merge pull request #1603 from jackwilsdon/add-hook-plugin
...
Add hook plugin (fixes #1561 )
2016-04-30 15:03:42 -07:00
wordofglass
1dd6739218
lyrics: fix a bug where the lyricswiki fetcher would try to unescape an empty (None) response and crash
2016-04-30 01:25: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
wordofglass
c3c7da8061
lyrics: simplify source handling a little
2016-04-28 18:31:22 +02:00
wordofglass
2928a16bd5
lyrics: actually disable translation when there's no langdetect
2016-04-28 17:22:55 +02:00
wordofglass
c4b11f889f
lyrics: clean up import handling and source removal
2016-04-28 17:15:25 +02:00
Jack Wilsdon
7c9440cf13
Merge master back in to fork
2016-04-28 04:15:02 +01:00
Jack Wilsdon
48fff93e78
Merge pull request #1961 from jackwilsdon/pep8-naming
...
Add flake8 check for pep8 naming
2016-04-28 04:07:17 +01:00
Jack Wilsdon
79d602b2a0
Use correct methods for ImageMagick and PIL info
2016-04-27 20:41:09 +01:00
Jack Wilsdon
8317a20bcd
Use correct methods from art resizer
2016-04-27 20:34:28 +01:00
Jack Wilsdon
b1c58e99ec
Update code to match pep8 naming standards
2016-04-27 20:15:10 +01:00
Adrian Sampson
09bc250413
Fix #1960 : Unicode in fetchart Wikipedia source
...
The SparQL query needed to use a Unicode literal.
2016-04-26 16:59:23 -07:00
Jack Wilsdon
c5e2334fb5
Remove useless unescape
...
Remove useless unescape as _scrape_script_cruft does it for us.
2016-04-25 19:24:26 +01:00
Jack Wilsdon
1be9c3003e
Use different method to remove junk from LyricsWiki
...
Use `_scrape_strip_cruft` instead of `scrape_lyrics_from_html` so that
LyricsWiki does not depend on Beautiful Soup.
2016-04-25 19:14:30 +01:00
wordofglass
607f41be43
Fix the previous fix...
2016-04-24 00:42:31 +02:00
wordofglass
4a5b886944
Fix two non-guarded import statements in the lyrics plugin
...
These could make the import process crash with a traceback.
2016-04-24 00:35:15 +02:00
Guilherme Danno
bf1b06f0c7
don't print entire lyrics during import
2016-04-22 17:30:06 -03:00
wordofglass
ac2f7fe712
Fix the fanarttv source failing when there were images found, but no cover art
2016-04-20 12:59:18 +02:00
wordofglass
5fbca32ea4
reuse the 'sources' names from the configuration for art_source
2016-04-19 11:25:03 +02:00
wordofglass
740efc0a0e
small fixes; consistently use 'source' instead of 'origin'
2016-04-19 11:23:57 +02:00
wordofglass
c27907b043
enable fetchart to store the artworks origin in a flexible field; as of now untested
2016-04-19 11:23:42 +02:00
Jack Wilsdon
85fd60852f
Remove unused dependencies
2016-04-18 19:21:31 +01:00
Jack Wilsdon
ffa2fdd278
Merge master back in to fork
2016-04-18 19:19:08 +01:00
Jack Wilsdon
dea091ee53
Improve error handling for invalid commands
2016-04-18 19:16:31 +01:00
wordofglass
9e774fdccd
Merge branch 'master' into fetchart_almost_square
2016-04-18 19:00:45 +02:00
wordofglass
11c6ca5271
Merge remote-tracking branch 'beetbox/master'
2016-04-18 18:53:46 +02:00
wordofglass
c3be244109
remove the personal key warning altogether; it's also in the docs and rather obtrusive
2016-04-18 18:52:18 +02:00
Guilherme Danno
019d7cd2e6
fix some typos
2016-04-18 12:36:42 -03:00
Guilherme Danno
09073630e3
Merge pull request #1945 from beetbox/export-plugin
...
Export plugin: Export data from queries to a json
2016-04-18 12:24:27 -03:00
Jack Wilsdon
070469e259
Remove unicode_literals from __future__ imports
2016-04-18 16:00:13 +01:00
Jack Wilsdon
3e35660ff3
Remove unnecessary escaping on double quotes
2016-04-18 15:36:08 +01:00
Jack Wilsdon
686e069bc4
Replace double quotes with single quotes
2016-04-18 15:35:15 +01:00
Jack Wilsdon
8b4f349e27
Improve hook plugin design and configuration
...
- Remove `shell` option and split all commands using `shlex.split`
before passing them to `subprocess.Popen`.
- General refactor of hook plugin code - move hook creation function
inside `HookPlugin`.
- Add improved error handling for invalid (i.e. empty) commands or
commands that do not exist.
2016-04-18 15:04:57 +01:00
wordofglass
20235264a4
rewire logic a bit; reasonable debug messages
2016-04-18 15:23:38 +02:00
Jack Wilsdon
dd949a9488
Merge master back in to fork
2016-04-18 14:06:45 +01:00
wordofglass
30bca5c8af
fix unconditionally printing the personal key warning for in fanart.tv in fetchart
2016-04-18 11:39:09 +02:00
Guilherme Danno
228ffc91be
use sort_keys to make the data more "predictable"
2016-04-17 23:47:12 -03:00
Guilherme Danno
5e3c65d32e
change option letter
2016-04-17 23:37:51 -03:00
Guilherme Danno
10acea4efd
Remove json monkey-patching and use encoder subclassing
2016-04-17 23:35:23 -03:00
Guilherme Danno
1e3704a27e
fix NotImplementedError()
2016-04-17 21:52:09 -03:00
Guilherme Danno
c211aabd72
simplify json printing
2016-04-17 21:39:53 -03:00
wordofglass
6cbbba7dae
initial work on allowing slightly non-square images in fetchart
2016-04-18 01:47:39 +02:00
Guilherme Danno
f58d4e838a
Query data from items and export the json
...
Based on the ``info`` plugin
2016-04-17 18:26:17 -03:00
wordofglass
8169983074
fix translation of the old remote_priority option for fetchart, add a test
2016-04-17 21:18:31 +02:00
Adrian Sampson
3fb2185925
Merge pull request #1898 from beetbox/flake8-future-import
...
Add __future__ import style checker
2016-04-16 15:24:46 -07:00
wordofglass
0f89f17227
add missing division future imports
2016-04-16 18:33:54 +02:00
wordofglass
36e91fc78b
fix fanart.tv merge
2016-04-16 14:17:46 +02:00
wordofglass
9ce10c2fda
Merge branch 'master' into fetchart_unify_sources,
...
i.e. adapt the fanart.tv source
2016-04-16 13:34:46 +02:00
wordofglass
0cfddfaa8a
add missing absolute_import future imports
2016-04-16 02:28:54 +02:00
wordofglass
6b43e1204f
add missing print_function future imports
2016-04-16 01:53:39 +02:00
Adrian Sampson
4691deb5a5
Merge pull request #1941 from wordofglass/fetchart_fanarttv
...
Fetchart: add fanart.tv source
2016-04-15 11:45:00 -07:00
wordofglass
4763fec35b
fanart.tv: remove overly verbose logging left over from debugging
2016-04-15 19:42:06 +02:00
wordofglass
3a2eb03e0e
Add fanart.tv API key
2016-04-15 19:32:17 +02:00
wordofglass
87aa5dab13
fixes according to feedback by @Kraymer
2016-04-15 14:15:25 +02:00
wordofglass
d46b45861b
typo, rename project key config option
2016-04-15 02:40:52 +02:00
wordofglass
ecc6e1c3d6
fanart.tv albumart fetching, missing a project API key
2016-04-15 02:28:04 +02:00
Fabrice Laporte
05970e8a93
re-query token when it has expired
2016-04-14 22:57:41 +02:00
Fabrice Laporte
56d7e5dfa0
send as little text as possible to bing api
...
Bing API has a limit of 2M chars/month. It’s common to have repeating
sentences in lyrics so to reduce number of chars sent per song, store
sentences in a set and send it, instead of sending the whole lyrics.
2016-04-14 22:57:17 +02:00
wordofglass
7322e212a4
fetchart: adapt test to earlier config read
2016-04-14 16:49:06 +02:00
wordofglass
aaf614c869
fetchart: move config reads to __init__
2016-04-14 16:00:24 +02:00
wordofglass
6bc3fb8f67
fetchart: make Candidate a new-style class
2016-04-14 15:27:47 +02:00
Fabrice Laporte
6cfc106b8a
better docs and debug msg
2016-04-14 08:31:55 +02:00
Fabrice Laporte
58df77e2cb
langdetect conditional import
2016-04-14 08:31:14 +02:00
Fabrice Laporte
e03c3af91f
don't translate lyrics already in the target language
2016-04-14 01:11:14 +02:00
Fabrice Laporte
66a627fed8
restore module docstring
2016-04-14 00:58:42 +02:00
Fabrice Laporte
3c2479ab49
translate lyrics using Bing API
...
By subscribing to Microsoft Translator API, one can now activate the
translation of lyrics from one set of source langages to a target
langage.
Translations are appended to each original sentence using ‘/‘ as
separator.
2016-04-14 00:53:58 +02:00
Fabrice Laporte
d67950cdcc
pep8
2016-04-14 00:45:55 +02:00
wordofglass
1cc4d11baf
Fetchart: fix tests and fetachart logic
2016-04-13 22:56:18 +02:00
wordofglass
a4994d2bf8
fetchart: fix more tests
2016-04-06 01:36:32 +02:00
wordofglass
bc877a6d7f
fetchart: fix tests (mostly pep8, syntax)
2016-04-06 01:19:44 +02:00
wordofglass
bbc06e9de9
fetchart: Adapt ArtForAlbumTest
2016-04-05 23:24:30 +02:00
wordofglass
a2141c6f3a
fetchart: fix refactoring
2016-04-05 22:44:13 +02:00
Adrian Sampson
fa2aa82a0d
Fix #1927 : useful error message for failed edit
2016-04-03 17:42:25 -04:00
Adrian Sampson
3f4f077272
edit: Log the invoked command
2016-04-03 17:38:40 -04:00
wordofglass
50bf28edd4
move constants into Candidate
2016-03-23 16:46:39 +01:00
wordofglass
8356e7d33d
fix syntax
2016-03-23 00:47:11 +01:00
wordofglass
b37cc02f1a
fetchart: Introduce the Candidate class, some fixes to the previous commit.
2016-03-22 20:52:25 +01:00
wordofglass
c0a041b87e
fetchart: Unify handling of local and remote sources.
2016-03-22 19:42:16 +01:00