Added basic show update functionality
This commit is contained in:
parent
79bcf1179e
commit
05b66d54b9
37
adl.py
37
adl.py
@ -67,6 +67,11 @@ def get_all_episodes(full_choice):
|
|||||||
full_choice = full_choice[63:65]
|
full_choice = full_choice[63:65]
|
||||||
return full_choice
|
return full_choice
|
||||||
|
|
||||||
|
# get score
|
||||||
|
def get_score(full_choice):
|
||||||
|
full_choice = full_choice[68:71]
|
||||||
|
return full_choice
|
||||||
|
|
||||||
# next episode
|
# next episode
|
||||||
def next_episode(title,episode,player):
|
def next_episode(title,episode,player):
|
||||||
watch_prompt(title, str(episode))
|
watch_prompt(title, str(episode))
|
||||||
@ -105,6 +110,36 @@ def custom_episode(title, player):
|
|||||||
watch_prompt(title, episode)
|
watch_prompt(title, episode)
|
||||||
os.system('anime dl "' + title + '" --episodes ' + episode + ' --play ' + player)
|
os.system('anime dl "' + title + '" --episodes ' + episode + ' --play ' + player)
|
||||||
|
|
||||||
|
# update title
|
||||||
|
def update_title(title, episode):
|
||||||
|
color_print("Current episode for " + title + " is " + str(episode))
|
||||||
|
custom = color_prommpt("Enter updated episode number: ")
|
||||||
|
if custom != "":
|
||||||
|
os.system('trackma -a ' + account + ' update "' + title + '" ' + custom)
|
||||||
|
else:
|
||||||
|
color_print("Skipping updating...")
|
||||||
|
|
||||||
|
# update score
|
||||||
|
def update_score(title, score):
|
||||||
|
color_print("Current score for " + title + " is " + score)
|
||||||
|
custom = color_prommpt("Enter updated score: ")
|
||||||
|
if custom != "":
|
||||||
|
os.system('trackma -a ' + account + ' score "' + title + '" ' + custom)
|
||||||
|
else:
|
||||||
|
color_print("Skipping updating...")
|
||||||
|
|
||||||
|
# update question
|
||||||
|
def update_question(title, episode, score):
|
||||||
|
while True:
|
||||||
|
color_print("Skipping watching episodes. Modifing entry.")
|
||||||
|
choice = color_prommpt("Update episode number or update score [E/s]: ")
|
||||||
|
if choice == "e" or choice == "E":
|
||||||
|
update_title(title, episode)
|
||||||
|
break
|
||||||
|
elif choice == "s" or choice == "S":
|
||||||
|
update_score(title, score)
|
||||||
|
break
|
||||||
|
|
||||||
# choose what to do with episode
|
# choose what to do with episode
|
||||||
def choose_episode():
|
def choose_episode():
|
||||||
os.system("cls")
|
os.system("cls")
|
||||||
@ -133,6 +168,7 @@ while True:
|
|||||||
title = get_title(full_choice)
|
title = get_title(full_choice)
|
||||||
episode = get_episode(full_choice)
|
episode = get_episode(full_choice)
|
||||||
last_episode = get_all_episodes(full_choice)
|
last_episode = get_all_episodes(full_choice)
|
||||||
|
score = get_score(full_choice)
|
||||||
while True:
|
while True:
|
||||||
action = choose_episode()
|
action = choose_episode()
|
||||||
if action == "":
|
if action == "":
|
||||||
@ -160,6 +196,7 @@ while True:
|
|||||||
custom_episode(title, player)
|
custom_episode(title, player)
|
||||||
break
|
break
|
||||||
elif action == "u" or action == "U":
|
elif action == "u" or action == "U":
|
||||||
|
update_question(title, episode, score)
|
||||||
break
|
break
|
||||||
elif action == "s" or action == "S":
|
elif action == "s" or action == "S":
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user