mirror of
https://github.com/beetbox/beets.git
synced 2025-12-10 10:32:34 +01:00
Detect ALAC with bitrate
This commit is contained in:
parent
72db4af7f8
commit
dd7cd2f8c2
1 changed files with 3 additions and 3 deletions
|
|
@ -1272,11 +1272,11 @@ class MediaFile(object):
|
|||
elif (type(self.mgfile).__name__ == 'M4A' or
|
||||
type(self.mgfile).__name__ == 'MP4'):
|
||||
# This hack differentiates AAC and ALAC until we find a more
|
||||
# deterministic approach. Mutagen only sets the sample rate
|
||||
# deterministic approach. Mutagen only sets the bitrate
|
||||
# for AAC files. See:
|
||||
# https://github.com/sampsyo/beets/pull/295
|
||||
if hasattr(self.mgfile.info, 'sample_rate') and \
|
||||
self.mgfile.info.sample_rate > 0:
|
||||
if hasattr(self.mgfile.info, 'bitrate') and \
|
||||
self.mgfile.info.bitrate > 0:
|
||||
self.type = 'aac'
|
||||
else:
|
||||
self.type = 'alac'
|
||||
|
|
|
|||
Loading…
Reference in a new issue