1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-26 09:37:25 +00:00

Post-processing fine-tuning

This commit is contained in:
morpheus65535 2018-03-25 09:25:37 -04:00
parent 167deadc09
commit b5d56614cf
2 changed files with 6 additions and 4 deletions

View file

@ -57,11 +57,13 @@ def path_replace_reverse(path):
return path return path
def pp_replace(pp_command, episode, subtitles, language, language_code2, language_code3): 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}}', 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('{{subtitles}}', subtitles)
pp_command = pp_command.replace('{{language}}', language) pp_command = pp_command.replace('{{subtitles_language}}', language)
pp_command = pp_command.replace('{{language_code2}}', language_code2) pp_command = pp_command.replace('{{subtitles_language_code2}}', language_code2)
pp_command = pp_command.replace('{{language_code3}}', language_code3) pp_command = pp_command.replace('{{subtitles_language_code3}}', language_code3)
return pp_command return pp_command
result = get_general_settings() result = get_general_settings()

View file

@ -264,7 +264,7 @@
</div> </div>
<div class="collapsed column"> <div class="collapsed column">
<div class="collapsed center aligned column"> <div class="collapsed center aligned column">
<div class="ui basic icon" data-tooltip="You can use those variables in your command (include the double curly brace): &lbrace;&lbrace;episode&rbrace;&rbrace; &lbrace;&lbrace;subtitles&rbrace;&rbrace; &lbrace;&lbrace;language&rbrace;&rbrace; &lbrace;&lbrace;language-code2&rbrace;&rbrace; &lbrace;&lbrace;language-code3&rbrace;&rbrace;" data-inverted=""> <div class="ui basic icon" data-tooltip="You can use those variables in your command (include the double curly brace): \n&lbrace;&lbrace;directory&rbrace;&rbrace; \n&lbrace;&lbrace;episode&rbrace;&rbrace; \n&lbrace;&lbrace;episode_name&rbrace;&rbrace; \n&lbrace;&lbrace;subtitles&rbrace;&rbrace; \n&lbrace;&lbrace;subtitles_language&rbrace;&rbrace; \n&lbrace;&lbrace;subtitles_language_code2&rbrace;&rbrace; \n&lbrace;&lbrace;subtitles_language_code3&rbrace;&rbrace;" data-inverted="">
<i class="help circle large icon"></i> <i class="help circle large icon"></i>
</div> </div>
</div> </div>