From b5d56614cfa120cdac05b2ec584c25439cc81746 Mon Sep 17 00:00:00 2001 From: morpheus65535 <5130500+morpheus65535@users.noreply.github.com> Date: Sun, 25 Mar 2018 09:25:37 -0400 Subject: [PATCH] Post-processing fine-tuning --- get_general_settings.py | 8 +++++--- views/settings.tpl | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/get_general_settings.py b/get_general_settings.py index 37fab629f..aa36c8df8 100644 --- a/get_general_settings.py +++ b/get_general_settings.py @@ -57,11 +57,13 @@ def path_replace_reverse(path): return path def pp_replace(pp_command, episode, subtitles, language, language_code2, language_code3): + pp_command = pp_command.replace('{{directory}}', os.path.dirname(episode)) pp_command = pp_command.replace('{{episode}}', episode) + pp_command = pp_command.replace('{{episode_name}}', os.path.splitext(os.path.basename(episode))[0]) pp_command = pp_command.replace('{{subtitles}}', subtitles) - pp_command = pp_command.replace('{{language}}', language) - pp_command = pp_command.replace('{{language_code2}}', language_code2) - pp_command = pp_command.replace('{{language_code3}}', language_code3) + pp_command = pp_command.replace('{{subtitles_language}}', language) + pp_command = pp_command.replace('{{subtitles_language_code2}}', language_code2) + pp_command = pp_command.replace('{{subtitles_language_code3}}', language_code3) return pp_command result = get_general_settings() diff --git a/views/settings.tpl b/views/settings.tpl index 0e553bb36..ccb4b3ef6 100644 --- a/views/settings.tpl +++ b/views/settings.tpl @@ -264,7 +264,7 @@