MusicBrainz provids composer, lyricist and arranger infomations related
to individual recordings. This commit adds query parameters to fetch them, and
write down to media files.
Tagging mapping is implemented according MusicBrainz Picard's data:
https://picard.musicbrainz.org/docs/mappings/
Signed-off-by: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com>
Part of #1966. This also introduces a nicer, more lightweight way to create and
destroy temporary directories, decoupling that functionality from the
giant morass that is TestHelper.
This was a vestige from when we used to need the unittest2 library for pre-2.7
compatibility. Now that we require Python 2.7, we aren't using that library
and this indirection wasn't doing any good.
This is a little dirty, what with the hard-coded encoding, but I don't feel
too bad about it because we're only manipulating our test fixtures and
temporary directory that way.
More on #1966.
Instead of the individial mutagen format exceptions use the
mutagen.MutagenError exception introduced in 1.25.
Since 1.33 mutagen will only raise MutagenError for load/save/delete
and no longer raise IOError. Translate both errors to UnreadableFileError
to support older and newer mutagen versions. Unify error handling
in __init__(), save() and delete().
Since it's no longer possible to get an IOError from MediaFile, adjust
all callers and tests accordingly.
This was tested with mutagen 1.27 and current mutagen master.
This reverts commit 9c41c39913.
That commit used byte strings for the `if __name__ == '__main__'` pattern,
which was necessary when we were doing unicode_literals. But it is wrong on
Python 3, and now that we're liberated from unicode_literals, we need to go
back to native strings for this comparison.
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.