Commit graph

2118 commits

Author SHA1 Message Date
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