fix bug handling audio fallback detection, resolves #31
This commit is contained in:
parent
4ebe6f2a37
commit
4cd6701c8a
1183
tubesync/spam
1183
tubesync/spam
File diff suppressed because it is too large
Load Diff
|
@ -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
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue