mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-04-24 06:37:16 -04:00
Fixed bad subtitles extension exception when uploading subtitles with uppercase extension. #1988
This commit is contained in:
parent
12143db41b
commit
551f57bc0e
2 changed files with 2 additions and 2 deletions
|
@ -140,7 +140,7 @@ class EpisodesSubtitles(Resource):
|
|||
|
||||
_, ext = os.path.splitext(subFile.filename)
|
||||
|
||||
if ext not in SUBTITLE_EXTENSIONS:
|
||||
if not isinstance(ext, str) or ext.lower() not in SUBTITLE_EXTENSIONS:
|
||||
raise ValueError('A subtitle of an invalid format was uploaded.')
|
||||
|
||||
try:
|
||||
|
|
|
@ -140,7 +140,7 @@ class MoviesSubtitles(Resource):
|
|||
|
||||
_, ext = os.path.splitext(subFile.filename)
|
||||
|
||||
if ext not in SUBTITLE_EXTENSIONS:
|
||||
if not isinstance(ext, str) or ext.lower() not in SUBTITLE_EXTENSIONS:
|
||||
raise ValueError('A subtitle of an invalid format was uploaded.')
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue