Skip to content

Commit 0d42906

Browse files
plotskiplotski
andauthored
Fix audio_codec detection for lower-case "codec_id" (#108)
* Fix audio_codec detection for lower-case "codec_id" * Houndfodder Co-authored-by: plotski <plotski@example.org>
1 parent e910657 commit 0d42906

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pythonbits/bb.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,10 @@ def _render_audio_codec(self):
496496

497497
if audio_track['codec_id'].startswith('A_'):
498498
audio_track['codec_id'] = audio_track['codec_id'][2:]
499-
audio_codecs = ('AC3', 'EAC3', 'DTS', 'FLAC', 'AAC', 'MP3', 'TRUEHD',
500-
'PCM', '2000')
499+
# Could be "ac-3"
500+
audio_track['codec_id'] = audio_track['codec_id'].upper()
501+
audio_codecs = ('AC3', 'AC-3', 'EAC3', 'DTS', 'FLAC', 'AAC', 'MP3',
502+
'TRUEHD', 'PCM', '2000')
501503
for c in audio_codecs:
502504
if audio_track['codec_id'].startswith(c):
503505
c = c.replace('EAC3', 'AC-3') \

0 commit comments

Comments
 (0)