Fixed bad subtitles extension exception when uploading subtitles with uppercase extension. #1988

This commit is contained in:
morpheus65535 2022-11-20 11:21:47 -05:00
parent 12143db41b
commit 551f57bc0e
2 changed files with 2 additions and 2 deletions

View File

@ -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:

View File

@ -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: