Commit graph

8066 commits

Author SHA1 Message Date
Adrian Sampson
ebc065ecec Merge branch 'mried-import-filefilter'
Merge of PR #1186.
2015-01-20 14:22:55 -08:00
Adrian Sampson
ec21fb8af1 Revert #1186 changes to beets core
The changes were:
- Return values from events.
- A new `import_task_created` event.
Both were added preemptively to master.
2015-01-20 14:22:43 -08:00
Adrian Sampson
a82f6c2d76 Docs tweaks and changelog for #1237, fix #1236 2015-01-20 14:10:33 -08:00
Adrian Sampson
38eecb93c9 Merge pull request #1237 from andremiller/master
Support for CORS
2015-01-20 14:02:27 -08:00
Andre Miller
5cf869e0f8 Updated web documentation for CORS 2015-01-20 20:52:24 +02:00
Malte Ried
a62a152010 Moved the regular expression file filter into a separate plugin. 2015-01-20 19:50:00 +01:00
Adrian Sampson
293e2512ed Imported count: sensitive to plugin skips
Regression from b7125e4343 pointed out by
@mried.
2015-01-20 09:55:56 -08:00
Andre Miller
f815138758 Combined cors and cors_origin config options into one 2015-01-20 19:53:04 +02:00
Bruno Cauet
d6a4046245 Avoid stacking logger prefixes 2015-01-20 17:34:01 +01:00
Bruno Cauet
f263935a51 Prevent shlex.split from returning strange encodings 2015-01-20 16:57:20 +01:00
Bruno Cauet
132f5ba912 Fix bytes/str with unicodenazi 2015-01-20 16:41:18 +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
53c21330c2 All tests use unicode_literals 2015-01-20 15:58:02 +01:00
Bruno Cauet
152e93136b test._common and test.helper use unicode literals 2015-01-20 15:52:47 +01:00
Bruno Cauet
438044c6ae Fix bytes/str with unicode-nazi
Further cleaning will require setting unicode_literals on plugins
2015-01-20 15:25:12 +01:00
Andre Miller
47ea4b7d8b flake8 formatting updates 2015-01-20 16:06:16 +02:00
Andre Miller
f47be23658 CORS support now uses flask-cor extension 2015-01-20 15:33:33 +02:00
Bruno Cauet
afb1611cf2 Fix test.helper __future__ imports 2015-01-20 12:51:27 +01:00
Bruno Cauet
02d8e88ef1 Replace all mentions of 'str' with 'bytes' 2015-01-20 12:48:15 +01:00
Bruno Cauet
9c41c39913 Do __name__ comparison with bytes and not unicode 2015-01-20 12:03:57 +01:00
Bruno Cauet
dae1bf026f functemplate: delete try/except/print debug stmts 2015-01-20 11:52:27 +01:00
Andre Miller
c8880de52c Fixes for flake8 validation 2015-01-20 00:38:26 +02:00
Andre Miller
bd63e1e386 Made CORS configurable and changed host default to 127.0.0.1 2015-01-20 00:20:26 +02:00
Bruno Cauet
454da9dc7b Fix print usage in test helper script 2015-01-19 22:08:04 +01:00
Bruno Cauet
2dab8e5fd6 Import unicode_literals in beets package 2015-01-19 21:41:33 +01:00
Frederik “Freso” S. Olesen
4d904e20cf changelog: Combine the two lastgenre genre addition entries.
See https://botbot.me/freenode/beets/msg/29935738/
2015-01-19 18:44:31 +01:00
Frederik “Freso” S. Olesen
cd1564f584 changelog: Move lastgenre genre additions to "Features".
See https://botbot.me/freenode/beets/msg/29935738/
2015-01-19 18:42:40 +01:00
Bruno Cauet
6fff7a954c Import unicode_literals in beets.dbcore 2015-01-19 17:18:50 +01:00
Bruno Cauet
8dd7bf0f0b unicode_literals in beets.ui and beets.autotag
Well, that was easy!
2015-01-19 17:18:50 +01:00
Bruno Cauet
c8d24c748e Import unicode_literals in beets.util
The hardest conversio is (by far) functemplate. It will also reguire a
great length of adaptation for python3, since the grammar of the
language changes and several functions (such as ast.arguments and
ast.FunctionDef) take additional mandatory parameters that don't exist
in python2.
2015-01-19 14:53:05 +01:00
Heinz Wiesinger
c86a5f9d97 Make tracktotal an item-level field.
This fixes tracktotal being stored incorrectly for multi-disc releases
where the individual discs have a different number of tracks and
per_disc_numbering is enabled.
2015-01-19 13:02:21 +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
2902cda036 tests: use absolute imports everywhere 2015-01-19 12:25:15 +01:00
Bruno Cauet
b436e75a9e embedart: fix behaviour on IM unparseable output, add tests
Test all EmbedCoverArtPlugin.check_art_similarity() code paths.

Improve #1241.
2015-01-19 11:50:51 +01:00
Frederik “Freso” S. Olesen
29739dbe04 Move autotag.mb.SEARCH_LIMIT to configuration.
Merge branch 'search-limit-in-config'

From pull request #1245 by @Freso.
2015-01-19 11:46:05 +01:00
Frederik “Freso” S. Olesen
20213c8916 Add changelog entry for new musicbrainz.searchlimit option. 2015-01-19 11:44:16 +01:00
Bruno Cauet
d5e3ff2f48 Improve repr(ConfigView): fix class name displayed
Use config.__class__.__name__ instead of "ConfigView" in __repr__().

Before:
>>> from beets import ui
>>> c
<ConfigView: root>
>>> c['foo']
<ConfigView: foo>

After:
>>> from beets import ui
>>> c
<LazyConfig: root>
>>> c['foo']
<Subview: foo>
2015-01-19 10:42:00 +01:00
Bruno Cauet
70ef96d565 Make list(ui.config) raise a TypeError
As per PEP234 (https://www.python.org/dev/peps/pep-0234/) if an object
has __getitem__() but not __iter__() then the former will be used to
build an iterable, invoking it with 0, then 1, ... until a KeyError is
raised. Lazy configuration makes it never happen, and list(config) runs
indefinitely, hogging all memory.

Implement __iter__(), which raises a TypeError, to solve that problem.
2015-01-19 10:35:32 +01:00
Frederik “Freso” S. Olesen
ad00c5dc7b docs: Fix hyperlink targets.
I inserted musicbrainz.searchlimit at the wrong place, breaking the
hyperlink target `match-config` - and I also forgot to add a hyperlink
target for `searchlimit`.
2015-01-19 02:24:32 +01:00
Frederik “Freso” S. Olesen
7c429e8c58 docs: New entry for musicbrainz.searchlimit config option. 2015-01-19 02:19:43 +01:00
Frederik “Freso” S. Olesen
cef0d2cfd7 autotag: Move mb.SEARCH_LIMIT to configuration. 2015-01-19 02:15:27 +01:00
Adrian Sampson
f346853710 embedart: Do not use shell for subprocess
This avoids bugs when the filename contains spaces, etc.

Pinging @Kraymer: I gave this a brief test, but can you check whether I messed
anything up more subtly?

Came up when looking at #1241.
2015-01-18 16:25:23 -08:00
Adrian Sampson
909c96b060 embedart: Handle unparseable IM output (#1241) 2015-01-18 16:18:22 -08:00
Adrian Sampson
dc5a79e35c New import_task_created event
Part of #1186.
2015-01-18 15:37:48 -08:00
Adrian Sampson
f145e3b184 More comment cleanup
It has been a while since I have looked at these, and many of the FIXMEs no
longer make sense to me. Better to open issues if there's really something to
fix.
2015-01-18 14:58:08 -08:00
Frederik “Freso” S. Olesen
167abda752 Merge branch 'master' of https://github.com/sampsyo/beets
Conflicts:
	docs/changelog.rst
2015-01-18 23:05:23 +01:00
Frederik “Freso” S. Olesen
5060fc34ea Changelog for classical genres in lastgenre plugin. 2015-01-18 23:03:50 +01:00
Adrian Sampson
9352927a0f Merge branch 'master' of github.com:sampsyo/beets 2015-01-18 14:00:37 -08:00
Frederik “Freso” S. Olesen
6031cab891 lastgenre: Add "mass" to the classical genre tree. 2015-01-18 23:00:27 +01:00
Frederik “Freso” S. Olesen
61797e7a74 lastgenre: Add classical music.
Merge branch 'Horla-master'

From pull request #1240 by @Horla. Fixes #1239.
2015-01-18 22:54:19 +01:00