Added option for cheking providers.
This commit is contained in:
parent
465286fd3c
commit
7647c04aba
18
adl.py
18
adl.py
@ -255,12 +255,24 @@ def argument_parser():
|
|||||||
help="By default trackma will use account 1. Use '-a 2' for example to change trackma account")
|
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,
|
ap.add_argument("-d", "--download", required=False, type=bool, nargs='?', const=True, default=False,
|
||||||
help="Download instead of streaming")
|
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,
|
ap.add_argument("-v", "--version", required=False, nargs='?', const=True,
|
||||||
help="Display version and exit")
|
help="Display version and exit")
|
||||||
|
|
||||||
args = vars(ap.parse_args())
|
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
|
# get player
|
||||||
if args["player"]:
|
if args["player"]:
|
||||||
@ -304,10 +316,6 @@ def argument_parser():
|
|||||||
download = False # specify whether to download or not
|
download = False # specify whether to download or not
|
||||||
msg = "watching" # msg for the watch prompt
|
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)
|
return (player, provider, show, episode, account, download, msg)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user