mirror of
https://github.com/beetbox/beets.git
synced 2026-01-26 01:55:35 +01:00
read-only metadata (length & bitrate) support for ogg and ape
This commit is contained in:
parent
cd9cfbe6fc
commit
4be6edab7b
2 changed files with 13 additions and 1 deletions
|
|
@ -589,7 +589,9 @@ class MediaFile(object):
|
|||
|
||||
@property
|
||||
def bitrate(self):
|
||||
if self.type == 'flac':
|
||||
if self.type in ('flac', 'ape'):
|
||||
# Simulate bitrate for lossless formats.
|
||||
#fixme: The utility of this guess is questionable.
|
||||
return self.mgfile.info.sample_rate * \
|
||||
self.mgfile.info.bits_per_sample
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -207,6 +207,16 @@ read_only_correct_dicts = {
|
|||
'length': 1.0,
|
||||
'bitrate': 64000,
|
||||
},
|
||||
|
||||
'full.ogg': {
|
||||
'length': 1.0,
|
||||
'bitrate': 48000,
|
||||
},
|
||||
|
||||
'full.ape': {
|
||||
'length': 1.0,
|
||||
'bitrate': 705600,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue