Added a suggestion do delete undecodable subtitles file

pull/56/merge
morpheus65535 7 years ago
parent 98de479389
commit 77c43550d8

@ -42,7 +42,7 @@ def store_subtitles(file):
try: try:
text = text.decode(encoding.original_encoding) text = text.decode(encoding.original_encoding)
except Exception as e: except Exception as e:
logging.exception('Error trying to detect character encoding for this subtitles file: ' + path_replace(os.path.join(os.path.dirname(file), subtitle))) logging.exception('Error trying to detect character encoding for this subtitles file: ' + path_replace(os.path.join(os.path.dirname(file), subtitle)) + ' You should try to delete this subtitles file manually and ask Bazarr to download it again.')
else: else:
detected_language = langdetect.detect(text) detected_language = langdetect.detect(text)
if len(detected_language) > 0: if len(detected_language) > 0:

Loading…
Cancel
Save