fix bug handling audio fallback detection, resolves #31

This commit is contained in:
meeb 2021-01-20 18:00:28 +11:00
parent 4ebe6f2a37
commit 4cd6701c8a
3 changed files with 4 additions and 1186 deletions

File diff suppressed because it is too large Load Diff

View File

@ -66,7 +66,7 @@ def get_best_audio_format(media):
# No codecs matched # No codecs matched
if media.source.can_fallback: if media.source.can_fallback:
# Can fallback, find the next highest bitrate non-matching codec # Can fallback, find the next highest bitrate non-matching codec
return False, audio_formats[0] return False, audio_formats[0]['id']
else: else:
# Can't fallback # Can't fallback
return False, False return False, False

View File

@ -839,6 +839,7 @@ class Media(models.Model):
fmt.append(resolution) fmt.append(resolution)
vcodec = vformat['vcodec'].lower() vcodec = vformat['vcodec'].lower()
fmt.append(vcodec) fmt.append(vcodec)
if aformat:
acodec = aformat['acodec'].lower() acodec = aformat['acodec'].lower()
fmt.append(acodec) fmt.append(acodec)
if vformat: if vformat: