mirror of
https://github.com/beetbox/beets.git
synced 2025-12-22 00:23:33 +01:00
Fix for unicode_literals in scrub
Here's an example where unicode_literals may not be a great idea: these should probably be "native" strings, i.e., bytes on 2.x and unicode on 3.x.
This commit is contained in:
parent
154917bbd1
commit
ac3ea16656
1 changed files with 16 additions and 16 deletions
|
|
@ -26,21 +26,21 @@ from beets import config
|
|||
from beets import mediafile
|
||||
|
||||
_MUTAGEN_FORMATS = {
|
||||
'asf': 'ASF',
|
||||
'apev2': 'APEv2File',
|
||||
'flac': 'FLAC',
|
||||
'id3': 'ID3FileType',
|
||||
'mp3': 'MP3',
|
||||
'mp4': 'MP4',
|
||||
'oggflac': 'OggFLAC',
|
||||
'oggspeex': 'OggSpeex',
|
||||
'oggtheora': 'OggTheora',
|
||||
'oggvorbis': 'OggVorbis',
|
||||
'oggopus': 'OggOpus',
|
||||
'trueaudio': 'TrueAudio',
|
||||
'wavpack': 'WavPack',
|
||||
'monkeysaudio': 'MonkeysAudio',
|
||||
'optimfrog': 'OptimFROG',
|
||||
b'asf': b'ASF',
|
||||
b'apev2': b'APEv2File',
|
||||
b'flac': b'FLAC',
|
||||
b'id3': b'ID3FileType',
|
||||
b'mp3': b'MP3',
|
||||
b'mp4': b'MP4',
|
||||
b'oggflac': b'OggFLAC',
|
||||
b'oggspeex': b'OggSpeex',
|
||||
b'oggtheora': b'OggTheora',
|
||||
b'oggvorbis': b'OggVorbis',
|
||||
b'oggopus': b'OggOpus',
|
||||
b'trueaudio': b'TrueAudio',
|
||||
b'wavpack': b'WavPack',
|
||||
b'monkeysaudio': b'MonkeysAudio',
|
||||
b'optimfrog': b'OptimFROG',
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ class ScrubPlugin(BeetsPlugin):
|
|||
"""
|
||||
classes = []
|
||||
for modname, clsname in _MUTAGEN_FORMATS.items():
|
||||
mod = __import__('mutagen.{0}'.format(modname),
|
||||
mod = __import__(b'mutagen.{0}'.format(modname),
|
||||
fromlist=[clsname])
|
||||
classes.append(getattr(mod, clsname))
|
||||
return classes
|
||||
|
|
|
|||
Loading…
Reference in a new issue