Commit graph

852 commits

Author SHA1 Message Date
Thomas Scholtes
c27d26ddbf Refactor zero plugin 2014-04-10 22:01:04 +02:00
Adrian Sampson
6b0c03db9d info: don't print out album art blobs 2014-04-10 11:50:59 -07:00
Adrian Sampson
4c9daa12cc Merge pull request #676 from geigerzaehler/item-try-write
Add item.try_write() to log errors
2014-04-10 11:33:06 -07:00
Adrian Sampson
b79a1199ad remove stray ITEM_FIELDS reference (#650) 2014-04-10 11:31:51 -07:00
Adrian Sampson
33b44717ab embedart: catch log errors (fix #678) 2014-04-10 11:24:59 -07:00
Thomas Scholtes
5d753b4f38 Remove ALBUM_* constants. Closes #650 2014-04-10 17:44:39 +02:00
Thomas Scholtes
f6f974ec87 Remove ITEM_* constants
We might consider renaming `Item._fields` to `Item.fields` since other parts of
beets use it as a replacement for `ITEM_KEYS`.

See also #650.
2014-04-10 17:11:21 +02:00
Thomas Scholtes
c3ea1ded30 Add item.try_write() to log errors
Many commands and plugins use `item.write()` to update tags. Since the success
of the call is not critical to the functionality of most consumers we want to
catch any exceptions, log an error and continue with our task. The new method
encapsulates this logic.

This fixes #675.
2014-04-10 15:26:05 +02:00
Thomas Scholtes
b7a26811ef Add "shell" keyword for commands and use it in convert
Convert used to split the user command at whitespaces and pass it to `Popen`.
This approach is to naive, it also was not consistent with output from the
logs. Instead we pass the whole command to a subshell.
2014-04-09 20:41:30 +02:00
Adrian Sampson
443b8089d5 remove unnecessary IndexableEnum
This is not really critical since list(Type)[i] works just as well. This fixes
a couple other problems from the enum transition:
- The name of TYPES was not really consistent with its new role as an enum
  type. Renamed this ImageType.
- Fix a rather egregious bug in embedart (undefined reference to Image).
2014-04-08 16:59:50 -07:00
Thomas Scholtes
071a5c363d Use new MediaFile api to embed art 2014-04-08 01:41:26 +02:00
Thomas Scholtes
55e5381bbd Merge branch 'extendable-mediafile'
Conflicts:
	beets/library.py
	docs/dev/plugins.rst
2014-04-07 23:49:29 +02:00
Thomas Scholtes
6402b664c6 More refactoring for convert 2014-04-07 20:17:55 +02:00
Thomas Scholtes
651bdf0acc Refactor convert plugin
* `encode()` raises an error when the command returns with non-zero exit
  status. We catch that in the higher-level conversion functions and skip to
  the next item without writing tags.

* Simplified the handling of the `keep_new` flag.
2014-04-07 18:24:59 +02:00
Thomas Scholtes
9d87a7fc02 Make convert --keep-new work again
Iincludes some more tests for the convert plugin. The test use the extended
TestHelper class and the new pathlib (see #621).
2014-04-07 18:07:43 +02:00
Adrian Sampson
dd053d7723 changelog and style fixes for #665 2014-04-06 17:59:30 -07:00
Lee Reinhardt
bf05135e5f Added extra checking to fetchart plugin.
Will avoid a KeyError being raised when Content-Type header is missing.
See #664.
2014-04-06 14:42:51 -05:00
Yevgeny Bezman
2a6e5c7273 Merge branch 'replaygain-backends'
Conflicts:
	tox.ini
2014-04-06 08:45:35 +03:00
Thomas Scholtes
1b434a7dae Import original file when conversion fails.
Fixes previous test
2014-04-05 21:09:12 +02:00
Thomas Scholtes
1c598d4cee Add replaygain target level for gstreamer 2014-04-04 22:42:17 +02:00
Thomas Scholtes
81a2433e9d Use GLib.MainLoop instead of deprecated GObject 2014-04-04 19:46:43 +02:00
Thomas Scholtes
81f53fb0d2 Add basic cli tests for replaygain 2014-04-04 19:44:16 +02:00
Yevgeny Bezman
cf49d88156 replaygain: clarified the need to strange thread initialization| 2014-04-04 20:20:14 +03:00
Yevgeny Bezman
d8c37d6ca3 replaygain: Added a FatalReplayGainError class to signal the plugin that the backend failed completely 2014-04-04 19:17:41 +02:00
Thomas Scholtes
a5bdbdcf7f Move available backends to class level
See also https://github.com/sampsyo/beets/issues/650
2014-04-04 19:17:41 +02:00
Thomas Scholtes
439fc1938f Remove debug print statements 2014-04-04 19:17:41 +02:00
Thomas Scholtes
89680d835a Refine docstrings and fix style issues (flake8) 2014-04-04 19:17:41 +02:00
Yevgeny Bezman
6aa1cc95cb replaygain: Improved error handling 2014-04-04 19:17:41 +02:00
Yevgeny Bezman
2d9f40d62d replaygain: fixed small errors introduced by previous refactor. Commented the code in key parts. 2014-04-04 19:17:41 +02:00
Adrian Sampson
08b2bff28d eliminate GStreamer globals and initialize_config 2014-04-04 19:17:41 +02:00
Adrian Sampson
2369122075 minor Python style; move namedtuples to module 2014-04-04 19:17:41 +02:00
Yevgeny Bezman
d2c6d00b7b replaygain: Added some informative prints, removed hardcoded debug print 2014-04-04 19:17:40 +02:00
Yevgeny Bezman
9581b91e10 replaygain: Added gstreamer support, fixed some small bugs 2014-04-04 19:17:40 +02:00
Yevgeny Bezman
86ee30df0d replaygain: modified current implementation to fit a backend framework in anticipation of other implementations 2014-04-04 19:17:40 +02:00
Thomas Scholtes
766c8b190b Add path argument to item.write()
Symmetrical to item.read(), this allows us to update the tags of files that are
not in the library. The motivation was this issue [1].

The commit also includes a nasty hack in the plugin code that prevents breaking
other plugins.

[1]: https://github.com/geigerzaehler/beets-check/issues/1
2014-04-04 14:56:10 +02:00
Adrian Sampson
c5174b3881 use command_output utility in echonest
That's the last direct use of the subprocess calls.
2014-04-03 19:51:50 -07:00
Adrian Sampson
d407db725f convert: catch OSErrors and display error message
This also adds close_fds (only available on Unixes) to the common subprocess
invocation utility.
2014-04-03 19:47:21 -07:00
Thomas Scholtes
4b1a1e3d65 Remove ITEM_KEYS_WRITABLE 2014-04-04 00:03:40 +02:00
Adrian Sampson
729e001432 benchmark: customizable album ID 2014-04-03 13:00:20 -07:00
Adrian Sampson
cd57c8da7f benchmarking for slow matches
Investigating #609. The culprit seems to be repeated reading of the config's
weight settings.
2014-04-03 11:56:26 -07:00
brilnius
e1878b34e7 Merge pull request #618 from brilnius/fix615
lastgenre plugin: separator in genre lists can now be configured
2014-03-19 22:22:41 +01:00
Bruno Tournay
81b74151ca Genre separator from config must be unicode string 2014-03-19 22:16:02 +01:00
Thomas Scholtes
0daea144e8 Fix album import feed with slashes
Makes tests from f2da1922b28571216c7bc0eaa71f56a316dc0d5d pass.
Fixes #610 and supersedes #611.
2014-03-19 17:26:11 +01:00
Bruno Tournay
618708916b Separator in genre lists can now be configured 2014-03-18 22:03:11 +01:00
Pedro Silva
e8f6781fa0 fix #568: ignore items with all keys null 2014-03-14 12:04:43 +01:00
brilnius
b8ef621941 Merge pull request #599 from brilnius/spl_auto
Ability to disable auto regeneration of smartplaylist
2014-03-10 22:46:55 +01:00
Bruno Tournay
865ea40eab Simplified config access 2014-03-10 22:44:38 +01:00
Johannes
856a28a8a0 Revert "no module-global session (#597)"
This reverts commit c56412a1d5.

 - The Requests library advertises itself as thread safe.
 - Cookies aren't so interesting, but keep-alive /
   connection pooling would be nice to have.
2014-03-10 08:53:12 +00:00
Bruno Tournay
33632e0caf We can now disable auto regeneration of smartplaylist 2014-03-09 22:57:07 +01:00
Adrian Sampson
fb038ecc30 changelog & style tweaks for album_query (#595) 2014-03-09 13:22:34 -07:00