Private GIT

Skip to content
Snippets Groups Projects
Commit 192e296a authored by Luca's avatar Luca
Browse files

PostProcessor 1°Try to get rid of double language subtitle extension

parent 356d52c8
No related branches found
No related tags found
No related merge requests found
......@@ -253,11 +253,13 @@ class PostProcessor(object):
cur_file_name = ek.ek(os.path.basename, cur_file_path)
# get the extension
cur_extension = cur_file_path.rpartition('.')[-1]
# cur_extension = cur_file_path.rpartition('.')[-1]
cur_extension = ek.ek(os.path.splitext, cur_file_path)[1][1:]
# check if file have language of subtitles
# check if file have subtitles language
if cur_extension in common.subtitleExtensions:
cur_lang = cur_file_path.rpartition('.')[0].rpartition('.')[-1]
# cur_lang = cur_file_path.rpartition('.')[0].rpartition('.')[-1]
cur_lang = ek.ek(os.path.splitext, ek.ek(os.path.splitext, cur_file_path)[0])[1][1:]
if cur_lang in sickbeard.SUBTITLES_LANGUAGES:
cur_extension = cur_lang + '.' + cur_extension
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment