Fix bad linux path.
This commit is contained in:
parent
cca11bba20
commit
391439ef9e
11
adl.py
11
adl.py
@ -11,8 +11,8 @@ if sys.platform == "win32":
|
|||||||
DEFAULT_DOWNLOAD_LOCATION = os.path.join('C:\\', 'Users', str(os.getlogin()), 'Videos', 'Anime')
|
DEFAULT_DOWNLOAD_LOCATION = os.path.join('C:\\', 'Users', str(os.getlogin()), 'Videos', 'Anime')
|
||||||
CLEAR = 'cls'
|
CLEAR = 'cls'
|
||||||
else:
|
else:
|
||||||
CONFIG_FILE_PATH = os.path.join('home', str(os.getlogin()), '.config', 'adl', 'config.json')
|
CONFIG_FILE_PATH = os.path.join('/home', str(os.getlogin()), '.config', 'adl', 'config.json')
|
||||||
DEFAULT_DOWNLOAD_LOCATION = os.path.join('home', str(os.getlogin()), 'Videos', 'Anime')
|
DEFAULT_DOWNLOAD_LOCATION = os.path.join('/home', str(os.getlogin()), 'Videos', 'Anime')
|
||||||
CLEAR = 'clear'
|
CLEAR = 'clear'
|
||||||
|
|
||||||
PROBLEMATIC_TITLES = ['Komi-san wa, Komyushou desu ',
|
PROBLEMATIC_TITLES = ['Komi-san wa, Komyushou desu ',
|
||||||
@ -113,10 +113,10 @@ def watch(title, episode, download, provider, download_location):
|
|||||||
else:
|
else:
|
||||||
cmd.append('stream')
|
cmd.append('stream')
|
||||||
|
|
||||||
cmd.append(f'"{provider}:{title}"')
|
cmd.append(f'{provider}:{title}')
|
||||||
cmd.append('-r')
|
cmd.append('-r')
|
||||||
cmd.append(episode)
|
cmd.append(episode)
|
||||||
|
|
||||||
subprocess.run(cmd)
|
subprocess.run(cmd)
|
||||||
|
|
||||||
if download:
|
if download:
|
||||||
@ -264,6 +264,8 @@ def argument_and_config_parser():
|
|||||||
# config
|
# config
|
||||||
config = {}
|
config = {}
|
||||||
ConfigExists = False
|
ConfigExists = False
|
||||||
|
# print(CONFIG_FILE_PATH)
|
||||||
|
# sys.exit()
|
||||||
if os.path.exists(CONFIG_FILE_PATH):
|
if os.path.exists(CONFIG_FILE_PATH):
|
||||||
config_content = open(CONFIG_FILE_PATH, encoding='utf-8-sig').read()
|
config_content = open(CONFIG_FILE_PATH, encoding='utf-8-sig').read()
|
||||||
config = eval(config_content)
|
config = eval(config_content)
|
||||||
@ -306,6 +308,7 @@ def argument_and_config_parser():
|
|||||||
provider = str(args["provider"])
|
provider = str(args["provider"])
|
||||||
elif ConfigExists and 'provider' in config and config['provider']:
|
elif ConfigExists and 'provider' in config and config['provider']:
|
||||||
provider = str(config["provider"])
|
provider = str(config["provider"])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
provider = "zoro"
|
provider = "zoro"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user