mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-25 06:26:37 +00:00
Uppercase the codec string first, not last
This commit is contained in:
parent
6fdcc5ffa5
commit
fb663d508f
@ -135,7 +135,7 @@ def seconds_to_timestr(seconds):
|
|||||||
|
|
||||||
|
|
||||||
def normalize_codec(codec_str):
|
def normalize_codec(codec_str):
|
||||||
result = str(codec_str)
|
result = str(codec_str).upper()
|
||||||
parts = result.split('.')
|
parts = result.split('.')
|
||||||
if len(parts) > 0:
|
if len(parts) > 0:
|
||||||
result = parts[0].strip()
|
result = parts[0].strip()
|
||||||
@ -146,7 +146,7 @@ def normalize_codec(codec_str):
|
|||||||
if str(0) in result:
|
if str(0) in result:
|
||||||
prefix = result.rstrip('0123456789')
|
prefix = result.rstrip('0123456789')
|
||||||
result = prefix + str(int(result[len(prefix):]))
|
result = prefix + str(int(result[len(prefix):]))
|
||||||
return result.upper()
|
return result
|
||||||
|
|
||||||
|
|
||||||
def parse_media_format(format_dict):
|
def parse_media_format(format_dict):
|
||||||
|
Loading…
Reference in New Issue
Block a user