Commit graph

10167 commits

Author SHA1 Message Date
nathdwek@laptop
6e3a9d9bc5 collect search results from plugins with yield 2016-11-21 13:39:44 +01:00
nathdwek@laptop
a7fed5b2c4 plugins: document notify_info_yielded 2016-11-21 10:15:51 +01:00
nathdwek@laptop
2b468c1872 plugins: make the signature of notify_info_yielded clearer 2016-11-21 10:15:51 +01:00
nathdwek@laptop
91d1aa9763 plugins: rename notify_info_received->notify_info_yielded 2016-11-21 10:15:51 +01:00
nathdwek@laptop
18a14e8005 Use generators and decorators to match items:
The easy parts
2016-11-21 10:15:51 +01:00
Nathan Dwek
871a815281 Merge pull request #2251 from beetbox/drop-reduce
acousticbrainz: refactor plugin
2016-11-20 23:03:41 +01:00
nath@home
147ced9eaa acousticbrainz: latest adjustments
* Readability and consistency
* Better logging: warn by default for attributes that were not found,
  but don't drown user with info when everything is going well.
2016-11-20 22:45:07 +01:00
nathdwek@laptop
eb1ea6177d acousticbrainz: drop DefaultList, be explicitly careful
* I don't see DefaultList be really helpful in many other cases, so having
  a beets.util.collections module (which could also conflict with the collections
  module from standard library) with only that in it is a little silly.
* It was elegant and concise, but there are implementation issues: it is not
  recommended to subclass builtin types, but the alternatives differ between python
  2 and 3 (subclass sequence or container or collections.abc?), moreover,
  interpreters can differ in the way they map syntaxic sugar to magic functions.
* Also, slicing and negative indexing could do weird things, so the class wouldn't
  be really intuitive and simple at the same time
2016-11-20 22:03:41 +01:00
nathdwek@laptop
51243240f6 acousticbrainz: Test _map_data_to_scheme with real data 2016-11-20 22:03:41 +01:00
nath@home
4586e2df5a acousticbrainz: Add unit tests 2016-11-20 22:03:41 +01:00
nathdwek@laptop
1d972b9907 acousticbrainz: rewrite _map_dict_to_scheme:
* Less lazy names
* Separate root function from childs more naturally
* Actually use defaultdict
2016-11-20 22:03:41 +01:00
nathdwek@laptop
324c67191d acousticbrainz: log fetched attributes and values as info 2016-11-20 22:03:41 +01:00
nathdwek@laptop
3979619f9f acousticbrainz: remove redundant comments 2016-11-20 22:03:41 +01:00
nath@home
7a676400dc acousticbrainz: Refactor the json handling part 2016-11-20 22:03:41 +01:00
nath@home
1963b52903 acousticbrainz: Initial cleanup 2016-11-20 22:03:41 +01:00
Adrian Sampson
6b0249df08 Changelog for #2270 (fix #899, fix #2264) 2016-11-19 16:14:24 -05:00
Adrian Sampson
be7e718b28 Merge pull request #2270 from lazka/apic-encoding-compat
mediafile: prefer latin-1 encoding for ID3 APIC descriptions. Fixes #899
2016-11-19 16:12:32 -05:00
Christoph Reiter
31f91129f3 Use mutagen id3 encoding constants 2016-11-19 10:36:31 +01:00
Christoph Reiter
31898111ed mediafile: prefer latin-1 encoding for ID3 APIC descriptions. Fixes #899
iTunes has problems with everything but latin-1
Try to use latin-1 if possible and fall back to utf-16.
2016-11-18 01:09:53 +01:00
Adrian Sampson
02bd7946c1 Merge pull request #2269 from beetbox/drop-idfallback-dict
drop IdentityFallbackDict and use get(key, key) instead
2016-11-16 22:06:09 -05:00
nathdwek@laptop
b8213181f2 drop IdentityFallbackDict:
Used by mediafile to determine the preferred extension of an image
That solution looked cool for 2 days, but in hindsight it was pretty bad
2016-11-16 23:10:15 +01:00
Adrian Sampson
62e9a15f4d Fix a copy n' paste error found by flake8 2016-11-16 12:03:07 -05:00
Adrian Sampson
4c6bf782a2 Ignore a new flake8 style warning
It's always fun when the style checker suddenly decides something new is bad
style. :/
2016-11-16 12:01:37 -05:00
Adrian Sampson
dafde564f3 Add __future__ imports to a new module 2016-11-16 11:58:18 -05:00
Adrian Sampson
6d3497c560 Merge pull request #2268 from ggVGc/print_flexible_decode_fix
Removed call to  .decode('utf-8') when printing flexible attributes
2016-11-16 11:55:00 -05:00
walt
c3b70b5098 Removed call to .decode('utf-8') when printing flexible attributes 2016-11-16 11:33:16 +01:00
Nathan Dwek
2eae2d6d17 Merge pull request #2262 from beetbox/fix-2260
Convert: Don't prompt for confirmation if query result is empty
Fix #2260
2016-11-13 20:37:09 +01:00
nathdwek@laptop
862d89001f convert: changelog for #2262 2016-11-13 18:07:14 +01:00
nathdwek@laptop
a0a9f5a7a8 Fix typos in tests 2016-11-13 17:49:18 +01:00
nathdwek@laptop
8067d82be8 convert: test for #2260 2016-11-13 17:47:07 +01: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
Adrian Sampson
88c7043b2f Reclassify a feature as a bug fix 2016-11-11 20:00:36 -05:00
Adrian Sampson
d6242ec207 Tiny whitespace fix 2016-11-11 20:00:14 -05:00
Adrian Sampson
790a40dd25 Merge pull request #2258 from michaelbub/master
sanitize playlist names
2016-11-11 19:59:32 -05:00
michaelbub
58fe63764e reduced line length 2016-11-11 22:34:46 +01:00
michaelbub
0a88338f8b obey style guide 2016-11-11 16:23:32 +01:00
michaelbub
28d18b7c64 update test to run with python 3.5.2 2016-11-11 15:53:14 +01:00
michaelbub
0bdc621d99 sanitizing playlist name AFTER values have been filled in and updated test accordingly 2016-11-11 15:21:34 +01:00
michaelbub
405a633b5a updated changelog with info about sanitized playlist names 2016-11-11 10:51:18 +01:00
michaelbub
5942adba01 fixed/updated test to consider sanitized playlist names 2016-11-11 10:07:25 +01:00
michaelbub
3e53d4caff sanitize playlist names
Make e. g.
- name: $albumartist/$year-$album.m3u'
work when album data includes non fs-friendly characters
2016-11-10 13:05:18 +01:00
awesomer
c5edd34841 Merge pull request #2256 from awesomer/missing-album-types
missing plugin, modify "missing" attribute by modifying album_types
2016-11-08 19:38:32 -08:00
root
f37df2dbd4 Whitespace for flake8. 2016-11-08 16:56:13 -08:00
root
acd5c6404f missing plugin, modify "missing" attribute by modifying album_types,
making it of type INTEGER. also changelog for above.
2016-11-08 16:23:57 -08:00
Nathan Dwek
ddbad5817d Merge pull request #2255 from beetbox/fix-2254-1545
Rewrite handling of images extensions and mimetype
2016-11-08 20:06:34 +01:00
nath@home
f236816431 embedart: Changelog for #2255 2016-11-08 18:48:44 +01:00
nath@home
3b4b9085ea utils.collections: rename IdentityUnlessDict to IdentityFallbackDict 2016-11-08 18:48:44 +01:00
nathdwek@laptop
e782885e50 embedart: Adapt tests for #2254 2016-11-08 18:48:44 +01:00
nathdwek@laptop
92ee141662 images: use jpg extensions for jpeg files everywhere
fix #2254
2016-11-08 18:48:44 +01:00