From 9f16cfd0786e0878fda93256eed8a729a7e3d2e0 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Mon, 27 Jun 2016 08:39:27 +0200 Subject: [PATCH] mediafile: Remove alac detection workaround No longer needed since we depend on mutagen 1.27 --- beets/mediafile.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/beets/mediafile.py b/beets/mediafile.py index b9fcae091..1874b7d10 100644 --- a/beets/mediafile.py +++ b/beets/mediafile.py @@ -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'