Commit graph

3196 commits

Author SHA1 Message Date
Adrian Sampson
ca6653fde8 Merge pull request #616 from krig/mbids
Log release ID for invalid MBIDs
2014-04-10 14:43:47 -07:00
Thomas Scholtes
7b954d9999 Remove null normalization for replaygain.
A `None` value for replagain fields is different from a `0.0` value [1].

[1]: https://github.com/sampsyo/beets/issues/157#issuecomment-39521322
2014-04-10 22:02:24 +02:00
Thomas Scholtes
c27d26ddbf Refactor zero plugin 2014-04-10 22:01:04 +02:00
Adrian Sampson
b322e3dda7 fix Sphinx complaint
Apparently, the ReST syntax doesn't like letters appearing after a
`backticked` phrase. That's sorta annoying.
2014-04-10 11:51:21 -07:00
Adrian Sampson
6b0c03db9d info: don't print out album art blobs 2014-04-10 11:50:59 -07:00
geigerzaehler
2be1bdeb1f Merge pull request #660 from geigerzaehler/mediafile-delete-tags
Delete and handle nonexistant tags
2014-04-10 20:35:19 +02: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
db7588021b Move log handler to beets.ui 2014-04-10 17:47:49 +02: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
883e3b3bc7 Flake8 fixes 2014-04-10 15:56:50 +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
d44adea9d3 Delete 'None' properties from media file 2014-04-10 14:35:37 +02:00
Thomas Scholtes
90dbefabd3 flake8 fixes 2014-04-10 01:17:29 +02:00
Thomas Scholtes
52dc84f43a Set literal not available in py26 2014-04-09 23:28:11 +02:00
Thomas Scholtes
a6839603cd Return None for missing tags.
Instead of returning a special "None value" if a tag does not exist, we return
none directly.
2014-04-09 23:28:11 +02:00
Thomas Scholtes
a114b67974 Remove all tags from empty.wma 2014-04-09 23:28:11 +02:00
Thomas Scholtes
663d91c4b2 Delete tags from media files 2014-04-09 23:28:11 +02:00
Thomas Scholtes
9d9f1b539f More robust tests for converted files 2014-04-09 20:41:58 +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
Thomas Scholtes
b9dca9b43e Make flake8 mandatory on travis
The travis build will fail if flake8 finds errors. Since not all code is
cleaned yet we ignore a couple of files in `setup.cfg`.

We'll gradualy clean the code remove the excluded files from `setup.cfg`.

See #669.
2014-04-09 19:20:01 +02:00
Thomas Scholtes
bc55747abc More flake fixes 2014-04-09 19:16:38 +02:00
Thomas Scholtes
4a2f0d11b8 Flake fixes 2014-04-09 18:22:02 +02:00
Thomas Scholtes
b88319da05 type_index for mediafile images defaults to "other"
The `Image.type_index` property is only used for tags that require an integer
to store the cover type like ID3v2. If the type of an image is not set we let
`type_index` return the integer for an "other" image. Other than a default
"front" value, this makes sure we do not inadvertidly add an image that will
be displayed in a player.
2014-04-09 18:12:47 +02:00
Thomas Scholtes
d164d514d9 Remove tox's system site packages 2014-04-09 18:11:18 +02:00
Adrian Sampson
323be89d4d fold OrderedEnum into autotag module
This puts the OrderedEnum generic class next to where it is actually used. It
also refers to the recipe it is taken from on docs.python.org. I also took the
opportunity to give this a capitalized name (since it's a proper type).
2014-04-08 17:10:50 -07: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
Adrian Sampson
9ad5e323e4 changelog note for #642 2014-04-08 15:27:10 -07:00
Adrian Sampson
1eb6ccf0ab Merge pull request #642 from ktkonrad/enum34
use the new python enum instead of hand-rolled version
2014-04-08 15:24:04 -07:00
Adrian Sampson
7456f556fb fix Sphinx syntax in docstrings 2014-04-07 20:50:41 -07:00
Adrian Sampson
9a21f555be MediaFile.update() no longer writes files
You now call update() followed by save(). This is mainly because the
implementation no longer performs lazy updates, so the need to pair tag
setting and writing together was diminished. Benefits in cleanliness:
- No need to duplicate the id3v2 option.
- Exception handling can be more precise.
- More closely resembles dict.update().
2014-04-07 20:34:48 -07:00
Adrian Sampson
b3f31cbc0a rename Item.media_fields to _media_fields
Following the convention of the other field sets and such. This helps avoid
any confusion with user-specified fields (although it's unlikely people will
want to name a flexible field "media_fields" :).
2014-04-07 20:21:20 -07:00
Adrian Sampson
8fb5ddc3b9 revise docs for expanded RG plugin
Among other things, this clarifies which options are available with each
backend.
2014-04-07 20:07:39 -07:00
Adrian Sampson
c6451cfc50 write: fix undefined reference to MediaFile 2014-04-07 19:44:21 -07:00
Adrian Sampson
28556a0c37 catch ReadError when calling item.read() 2014-04-07 19:42:54 -07:00
Thomas Scholtes
071a5c363d Use new MediaFile api to embed art 2014-04-08 01:41:26 +02:00
Thomas Scholtes
43f94ab7e6 Test convert on import 2014-04-08 01:22:02 +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
Adrian Sampson
deaf35b9b6 Merge pull request #666 from johtso/update-mpd-links
Update MPD links in docs
2014-04-07 11:24:31 -07:00
Thomas Scholtes
6402b664c6 More refactoring for convert 2014-04-07 20:17:55 +02:00
Johannes
2eadd9e3de Update MPD links in docs 2014-04-07 18:04:15 +01:00
Thomas Scholtes
6eb497b21b Remove pathlib dependency 2014-04-07 18:33:12 +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
5fae387d26 Changelog for 9d87a7fc02 2014-04-07 18:08:27 +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
Adrian Sampson
1d212eb126 Merge branch 'master' of github.com:sampsyo/beets 2014-04-06 17:56:40 -07:00
Adrian Sampson
7501072877 Merge pull request #665 from lee-reinhardt/fetchart-keyerror
Added extra checking to fetchart plugin.
2014-04-06 17:56:34 -07:00