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

pull/1991/head
morpheus65535 2 years ago
parent 12143db41b
commit 551f57bc0e

@ -140,7 +140,7 @@ class EpisodesSubtitles(Resource):
_, ext = os.path.splitext(subFile.filename) _, 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.') raise ValueError('A subtitle of an invalid format was uploaded.')
try: try:

@ -140,7 +140,7 @@ class MoviesSubtitles(Resource):
_, ext = os.path.splitext(subFile.filename) _, 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.') raise ValueError('A subtitle of an invalid format was uploaded.')
try: try:

Loading…
Cancel
Save