mirror of
https://github.com/open-webui/open-webui
synced 2025-06-08 15:37:22 +00:00
Merge pull request #14509 from r0mdau/fix/audio-format
fix: only trust codec_name for audio conversion
This commit is contained in:
commit
d6c3f93cfd
@ -96,12 +96,9 @@ def is_audio_conversion_required(file_path):
|
|||||||
# File is AAC/mp4a audio, recommend mp3 conversion
|
# File is AAC/mp4a audio, recommend mp3 conversion
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# If the codec name or file extension is in the supported formats
|
# If the codec name is in the supported formats
|
||||||
if (
|
if (codec_name in SUPPORTED_FORMATS):
|
||||||
codec_name in SUPPORTED_FORMATS
|
return False
|
||||||
or os.path.splitext(file_path)[1][1:].lower() in SUPPORTED_FORMATS
|
|
||||||
):
|
|
||||||
return False # Already supported
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user