Commit graph

3221 commits

Author SHA1 Message Date
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
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
9c00e43b30 changelog: added a note regarding the new replaygain plugin 2014-04-06 08:49:38 +03:00
Yevgeny Bezman
2a6e5c7273 Merge branch 'replaygain-backends'
Conflicts:
	tox.ini
2014-04-06 08:45:35 +03:00
Adrian Sampson
1bb8991a60 windows guide: simplify pip installation
The get-pip.py script is immensely convenient and will get setuptools for you
if you don't have it already.
2014-04-05 18:46:05 -07:00
Adrian Sampson
c09bac603f dbcore: types translate null values on assignment
In preparation for #660, where we will allow MediaFile to expose None values
when tags are missing (and consume None to remove tags). This makes it
possible to hide nullness in the rest of beets by translating None to a
suitable zero-ish value on field assignment.

Types can of course opt out of this to preserve a distinct null value. We do
this now for the album_id field, which needs to be null to indicate
singletons.

Type.normalize() also enables more sophisticated translations (e.g., an
integer field could round off float values assigned into it) in the future.
2014-04-05 16:27:07 -07:00
Thomas Scholtes
1b434a7dae Import original file when conversion fails.
Fixes previous test
2014-04-05 21:09:12 +02:00
Thomas Scholtes
0a08696add Test convert error during import
When the conversion of an audio file fails during import the original should be
imported. See #659
2014-04-05 21:09:12 +02:00
Thomas Scholtes
41708865f5 Add helper for high-level tests 2014-04-05 21:09:12 +02:00
Adrian Sampson
c742ad631e version bump: 1.3.5 2014-04-05 11:55:14 -07:00
Adrian Sampson
f44960c774 one day late 2014-04-05 11:39:11 -07:00
Adrian Sampson
44bd499af8 pretty up changelog for 1.3.4 release 2014-04-04 18:15:01 -07:00
Adrian Sampson
a6de671994 Merge branch 'master' of github.com:sampsyo/beets 2014-04-04 18:05:19 -07:00
Thomas Scholtes
4f844dfb92 Travis and gstreamer: I give up! 2014-04-04 23:15:39 +02:00
Thomas Scholtes
c77b030f15 Travis and gstreamer. One last try. Seriously. 2014-04-04 23:06:08 +02:00
Thomas Scholtes
6286bc0b0f Include site-packages on travis and skip tests otherwise 2014-04-04 22:43:08 +02:00
Thomas Scholtes
5b277eedf8 Add replaygain test for command backend 2014-04-04 22:42:17 +02:00
Thomas Scholtes
1c598d4cee Add replaygain target level for gstreamer 2014-04-04 22:42:17 +02:00
Yevgeny Bezman
b47e6dd4d4 replaygain: added a test for skipping already calculated items 2014-04-04 22:01:59 +03:00
Thomas Scholtes
04ab2be424 Final attempt at travis and gstreamer 2014-04-04 20:39:13 +02:00
Thomas Scholtes
5d40dc0fab Fix typo in .travis.yml 2014-04-04 20:16:03 +02:00
Thomas Scholtes
c54d8cb96c Add python-gi and bad gstreamer plugins to travis 2014-04-04 20:09:44 +02:00
Thomas Scholtes
43f2c483b7 Install gstreamer1.0 on travis 2014-04-04 19:58:34 +02:00
Thomas Scholtes
5d666fa4e7 Reset config and plugins after tests 2014-04-04 19:52:39 +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