mediafile: Remove alac detection workaround

No longer needed since we depend on mutagen 1.27
This commit is contained in:
Christoph Reiter 2016-06-27 08:39:27 +02:00
parent 3984febf6c
commit 9f16cfd078

View file

@ -1384,20 +1384,10 @@ class MediaFile(object):
elif (type(self.mgfile).__name__ == 'M4A' or
type(self.mgfile).__name__ == 'MP4'):
info = self.mgfile.info
if hasattr(info, 'codec'):
if info.codec and info.codec.startswith('alac'):
self.type = 'alac'
else:
self.type = 'aac'
if info.codec and info.codec.startswith('alac'):
self.type = 'alac'
else:
# This hack differentiates AAC and ALAC on versions of
# Mutagen < 1.26. Once Mutagen > 1.26 is out and
# required by beets, we can remove this.
if hasattr(self.mgfile.info, 'bitrate') and \
self.mgfile.info.bitrate > 0:
self.type = 'aac'
else:
self.type = 'alac'
self.type = 'aac'
elif (type(self.mgfile).__name__ == 'ID3' or
type(self.mgfile).__name__ == 'MP3'):
self.type = 'mp3'