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,8 +839,9 @@ class Media(models.Model):
fmt.append(resolution) fmt.append(resolution)
vcodec = vformat['vcodec'].lower() vcodec = vformat['vcodec'].lower()
fmt.append(vcodec) fmt.append(vcodec)
acodec = aformat['acodec'].lower() if aformat:
fmt.append(acodec) acodec = aformat['acodec'].lower()
fmt.append(acodec)
if vformat: if vformat:
if vformat['is_60fps']: if vformat['is_60fps']:
fps = '60fps' fps = '60fps'