1.0 Update
This commit is contained in:
parent
538fdc5b7d
commit
b1ff88f03f
4 changed files with 14 additions and 41 deletions
14
adl.py
14
adl.py
|
@ -15,13 +15,11 @@ if sys.platform == "win32":
|
|||
os.getlogin()), 'Documents', 'Adl', 'config.json')
|
||||
DEFAULT_DOWNLOAD_LOCATION = os.path.join(
|
||||
'C:\\', 'Users', str(os.getlogin()), 'Videos', 'Anime')
|
||||
CLEAR = 'cls'
|
||||
else:
|
||||
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')
|
||||
CLEAR = 'clear'
|
||||
|
||||
PROBLEMATIC_TITLES = ['Komi-san wa, Komyushou desu ',
|
||||
'SK∞']
|
||||
|
@ -77,7 +75,6 @@ def color_prommpt(text):
|
|||
def retrieve_list(account):
|
||||
color_print(f"Running trackma retrieve for account {account}...")
|
||||
subprocess.run(["trackma", "-a", account, "retrieve"])
|
||||
subprocess.run(CLEAR)
|
||||
|
||||
|
||||
# retrieve updated list
|
||||
|
@ -85,7 +82,6 @@ def retrieve_list_update(account):
|
|||
color_print(
|
||||
f"Running trackma retrieve for account {account} to get the updated list...")
|
||||
subprocess.run(["trackma", "-a", account, "retrieve"])
|
||||
subprocess.run(CLEAR)
|
||||
|
||||
|
||||
# load list
|
||||
|
@ -101,7 +97,6 @@ def load_list(account):
|
|||
# exit prompt
|
||||
def exit_ask():
|
||||
while True:
|
||||
subprocess.run(CLEAR)
|
||||
choice = color_prommpt("Want to watch another anime? [Y/n]: ")
|
||||
if choice == "N" or choice == "n":
|
||||
exit_adl()
|
||||
|
@ -292,13 +287,11 @@ def wanna_update_title_after_watch(index, title, episode, score, download, accou
|
|||
|
||||
# choose what to do with episode
|
||||
def choose_episode():
|
||||
subprocess.run(CLEAR)
|
||||
color_print(CHOOSE_EPISODE)
|
||||
return color_prommpt("Your choice? [N/l/a/i/0-9/r/c/u/s]: ")
|
||||
|
||||
|
||||
def choose_episode_specific_show():
|
||||
subprocess.run(CLEAR)
|
||||
color_print(CHOOSE_EPISODE_SPECIFIC_SHOW)
|
||||
return color_prommpt("Your choice? [A/i/c/s]: ")
|
||||
|
||||
|
@ -329,8 +322,6 @@ def argument_and_config_parser():
|
|||
help="Download instead of streaming")
|
||||
ap.add_argument("-l", "--download-location", required=False,
|
||||
help="Define downloads location, Default location is in 'User folder/Videos/Anime'")
|
||||
ap.add_argument("-t", "--test-providers", required=False, type=bool, nargs='?', const=True, default=False,
|
||||
help="Check the state of possible providers")
|
||||
ap.add_argument("-v", "--version", required=False, nargs='?', const=True,
|
||||
help="Display version and exit")
|
||||
|
||||
|
@ -341,11 +332,6 @@ def argument_and_config_parser():
|
|||
print(f"Py-adl version {VERSION}")
|
||||
sys.exit()
|
||||
|
||||
# check if providers are working
|
||||
if args["test_providers"]:
|
||||
subprocess.run(["animdl", "test"])
|
||||
sys.exit()
|
||||
|
||||
# get provider
|
||||
if args['provider']:
|
||||
provider = str(args["provider"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue