1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-23 08:13:14 +00:00
This commit is contained in:
Louis Vézina 2020-04-11 10:43:03 -04:00
parent 8f1d6883e7
commit 93b95f9936

View file

@ -481,6 +481,10 @@ def manual_upload_subtitle(path, language, forced, title, scene_name, media_type
chmod = int(settings.general.chmod, 8) if not sys.platform.startswith( chmod = int(settings.general.chmod, 8) if not sys.platform.startswith(
'win') and settings.general.getboolean('chmod_enabled') else None 'win') and settings.general.getboolean('chmod_enabled') else None
dest_directory = get_target_folder(path)
fake_video_path = None
if dest_directory:
fake_video_path = os.path.join(dest_directory, os.path.split(path)[1])
_, ext = os.path.splitext(subtitle.filename) _, ext = os.path.splitext(subtitle.filename)
language = alpha3_from_alpha2(language) language = alpha3_from_alpha2(language)
@ -493,7 +497,7 @@ def manual_upload_subtitle(path, language, forced, title, scene_name, media_type
if forced: if forced:
lang_obj = Language.rebuild(lang_obj, forced=True) lang_obj = Language.rebuild(lang_obj, forced=True)
subtitle_path = get_subtitle_path(video_path=force_unicode(path), subtitle_path = get_subtitle_path(video_path=force_unicode(fake_video_path if fake_video_path else path),
language=None if single else lang_obj, language=None if single else lang_obj,
extension=ext, extension=ext,
forced_tag=forced) forced_tag=forced)