mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-26 09:37:25 +00:00
Fixed deletion of subtitles with file extension other than srt.
This commit is contained in:
parent
34685b3d19
commit
3a14099e36
1 changed files with 4 additions and 2 deletions
|
@ -3,6 +3,8 @@
|
|||
import os
|
||||
import logging
|
||||
|
||||
from subliminal.subtitle import SUBTITLE_EXTENSIONS
|
||||
|
||||
from app.event_handler import event_stream
|
||||
from languages.get_languages import language_from_alpha2
|
||||
from utilities.path_mappings import path_mappings
|
||||
|
@ -16,8 +18,8 @@ from radarr.notify import notify_radarr
|
|||
|
||||
def delete_subtitles(media_type, language, forced, hi, media_path, subtitles_path, sonarr_series_id=None,
|
||||
sonarr_episode_id=None, radarr_id=None):
|
||||
if not subtitles_path.endswith('.srt'):
|
||||
logging.error('BAZARR can only delete .srt files.')
|
||||
if not os.path.splitext(subtitles_path)[1] in SUBTITLE_EXTENSIONS:
|
||||
logging.error('BAZARR can only delete subtitles files.')
|
||||
return False
|
||||
|
||||
language_log = language
|
||||
|
|
Loading…
Reference in a new issue