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
if media.source.can_fallback:
# Can fallback, find the next highest bitrate non-matching codec
return False, audio_formats[0]
return False, audio_formats[0]['id']
else:
# Can't fallback
return False, False

View File

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