Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Issues #103 and #104 #106

Merged
merged 2 commits into from
Nov 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions anime_dl/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
__author__ = "Xonshiz"
__email__ = "[email protected]"
"""
import os,sys,inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0,parentdir)
import anime_dl

from Anime_dl import *
from sys import exit
from version import __version__
Expand Down
20 changes: 10 additions & 10 deletions anime_dl/sites/crunchyroll.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,49 +310,49 @@ def sub_prepare(self):
for sub_file in glob("*.ass"):
if sub_file.endswith(".enUS.ass"):
subtitles_files.insert(0,
"--track-name 0:English_US --ui-language en_US --language 0:eng --default-track 0:yes --sub-charset 0:utf-8 " + '"' + str(
"--track-name 0:English_US --language 0:eng --default-track 0:yes --sub-charset 0:utf-8 " + '"' + str(
os.path.realpath(sub_file)) + '" ')

elif sub_file.endswith(".enGB.ass"):
subtitles_files.append(
"--track-name 0:English_UK --ui-language en_US --language 0:eng --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
"--track-name 0:English_UK --language 0:eng --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
os.path.realpath(sub_file)) + '" ')

elif sub_file.endswith(".esLA.ass"):
subtitles_files.append(
"--track-name 0:Espanol --ui-language es_ES --language 0:spa --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
"--track-name 0:Espanol --language 0:spa --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
os.path.realpath(sub_file)) + '" ')
elif sub_file.endswith(".esES.ass"):
subtitles_files.append(
"--track-name 0:Espanol_Espana --ui-language es_ES --language 0:spa --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
"--track-name 0:Espanol_Espana --language 0:spa --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
os.path.realpath(sub_file)) + '" ')
elif sub_file.endswith(".ptBR.ass"):
subtitles_files.append(
"--track-name 0:Portugues_Brasil --ui-language pt_BR --language 0:por --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
"--track-name 0:Portugues_Brasil --language 0:por --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
os.path.realpath(sub_file)) + '" ')
elif sub_file.endswith(".ptPT.ass"):
subtitles_files.append(
"--track-name 0:Portugues_Portugal --ui-language pt_PT --language 0:por --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
"--track-name 0:Portugues_Portugal --language 0:por --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
os.path.realpath(sub_file)) + '" ')
elif sub_file.endswith(".frFR.ass"):
subtitles_files.append(
"--track-name 0:Francais_France --ui-language fr_FR --language 0:fre --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
"--track-name 0:Francais_France --language 0:fre --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
os.path.realpath(sub_file)) + '" ')
elif sub_file.endswith(".deDE.ass"):
subtitles_files.append(
"--track-name 0:Deutsch --ui-language de_DE --language 0:ger --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
"--track-name 0:Deutsch --language 0:ger --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
os.path.realpath(sub_file)) + '" ')
elif sub_file.endswith(".arME.ass"):
subtitles_files.append(
"--track-name 0:Arabic --language 0:ara --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
os.path.realpath(sub_file)) + '" ')
elif sub_file.endswith(".itIT.ass"):
subtitles_files.append(
"--track-name 0:Italiano --ui-language it_IT --language 0:ita --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
"--track-name 0:Italiano --language 0:ita --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
os.path.realpath(sub_file)) + '" ')
elif sub_file.endswith(".trTR.ass"):
subtitles_files.append(
"--track-name 0:Turkce --ui-language tr_TR --language 0:tur --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
"--track-name 0:Turkce --language 0:tur --default-track 0:no --sub-charset 0:utf-8 " + '"' + str(
os.path.realpath(sub_file)) + '" ')
else:
subtitles_files.append(
Expand Down