|
|
|
@ -170,15 +170,21 @@ def store_subtitles_movie(original_path, reversed_path):
|
|
|
|
|
if str(os.path.splitext(subtitle)[0]).lower().endswith(tuple(brazilian_portuguese)):
|
|
|
|
|
logging.debug("BAZARR external subtitles detected: " + "pb")
|
|
|
|
|
actual_subtitles.append(
|
|
|
|
|
[str("pb"), original_path])
|
|
|
|
|
[str("pb"),
|
|
|
|
|
path_replace_reverse_movie(os.path.join(os.path.dirname(reversed_path), dest_folder, subtitle))]
|
|
|
|
|
)
|
|
|
|
|
elif str(os.path.splitext(subtitle)[0]).lower().endswith(tuple(brazilian_portuguese_forced)):
|
|
|
|
|
logging.debug("BAZARR external subtitles detected: " + "pb:forced")
|
|
|
|
|
actual_subtitles.append(
|
|
|
|
|
[str("pb:forced"), original_path])
|
|
|
|
|
[str("pb:forced"),
|
|
|
|
|
path_replace_reverse_movie(os.path.join(os.path.dirname(reversed_path), dest_folder, subtitle))]
|
|
|
|
|
)
|
|
|
|
|
elif str(language) != 'und':
|
|
|
|
|
logging.debug("BAZARR external subtitles detected: " + str(language))
|
|
|
|
|
actual_subtitles.append(
|
|
|
|
|
[str(language), original_path])
|
|
|
|
|
[str(language),
|
|
|
|
|
path_replace_reverse_movie(os.path.join(os.path.dirname(reversed_path), dest_folder, subtitle))]
|
|
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
if os.path.splitext(subtitle)[1] != ".sub":
|
|
|
|
|
logging.debug("BAZARR falling back to file content analysis to detect language.")
|
|
|
|
|