mirror of
https://github.com/morpheus65535/bazarr.git
synced 2024-11-10 17:13:35 +08:00
Continuing development.
This commit is contained in:
parent
ae35529de8
commit
d3c4fc252b
1 changed files with 9 additions and 3 deletions
|
@ -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.")
|
||||
|
|
Loading…
Reference in a new issue