Merge pull request #14509 from r0mdau/fix/audio-format

fix: only trust codec_name for audio conversion
This commit is contained in:
Tim Jaeryang Baek 2025-05-30 01:12:22 +04:00 committed by GitHub
commit d6c3f93cfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -96,12 +96,9 @@ def is_audio_conversion_required(file_path):
# File is AAC/mp4a audio, recommend mp3 conversion
return True
# If the codec name or file extension is in the supported formats
if (
codec_name in SUPPORTED_FORMATS
or os.path.splitext(file_path)[1][1:].lower() in SUPPORTED_FORMATS
):
return False # Already supported
# If the codec name is in the supported formats
if (codec_name in SUPPORTED_FORMATS):
return False
return True
except Exception as e: