Added option for cheking providers.

This commit is contained in:
CronyAkatsuki 2021-11-05 13:54:57 +01:00
parent 465286fd3c
commit 7647c04aba
2 changed files with 13 additions and 5 deletions

18
adl.py
View File

@ -255,13 +255,25 @@ def argument_parser():
help="By default trackma will use account 1. Use '-a 2' for example to change trackma account")
ap.add_argument("-d", "--download", required=False, type=bool, nargs='?', const=True, default=False,
help="Download instead of streaming")
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")
args = vars(ap.parse_args())
# print(args)
print(args)
# print the version
if args["version"]:
print("Py-adl version 1.1")
sys.exit()
# check if providers are working
if args["test_providers"]:
subprocess.run("anime test")
sys.exit()
# get player
if args["player"]:
player = str(args["player"]) # get player from user
@ -304,10 +316,6 @@ def argument_parser():
download = False # specify whether to download or not
msg = "watching" # msg for the watch prompt
# print the version
if args["version"]:
print("Py-adl version 1.1")
sys.exit()
return (player, provider, show, episode, account, download, msg)

0
fzf.txt Normal file
View File