continuous nex episode wathc

This commit is contained in:
CronyAkatsuki 2021-07-03 11:43:36 +02:00
parent c732e50a4f
commit 1b96f8c811

36
adl.py
View File

@ -75,8 +75,19 @@ def get_score(full_choice):
# next episode # next episode
def next_episode(title,episode,player): def next_episode(title,episode,player):
watch_prompt(title, str(episode)) watch_next = True
os.system('anime dl "' + title + '" --episodes ' + str(episode + 1) + ' --play ' + player) while watch_next:
episode = episode + 1
watch_prompt(title, str(episode))
os.system('anime dl "' + title + '" --episodes ' + str(episode) + ' --play ' + player)
while True:
color_print("Current watched episode: " + str(episode))
yn = color_prommpt("Wanna watch next episode? [Y/n]: ")
if yn == "Y" or yn == "y":
break
elif yn == "N" or yn == "n":
watch_next = False
break
# all from last watched # all from last watched
def all_from_last(title,episode, player): def all_from_last(title,episode, player):
@ -154,13 +165,15 @@ def wanna_continu_watch():
def wanna_update_title_after_watch(title, episode, score): def wanna_update_title_after_watch(title, episode, score):
while True: while True:
yn = color_prommpt("Wanna update episode number or update score of watched anime? [E/s]: ") yn = color_prommpt("Wanna update episode number or update score of watched anime? [N/e/s]: ")
if yn == "E" or yn == "e": if yn == "E" or yn == "e":
update_title(title, episode) update_title(title, episode)
break break
elif yn == "S" or yn == "s": elif yn == "S" or yn == "s":
update_score(title, score) update_score(title, score)
break break
elif yn == "N" or yn == "n":
break
# choose what to do with episode # choose what to do with episode
def choose_episode(): def choose_episode():
@ -195,18 +208,12 @@ while True:
action = choose_episode() action = choose_episode()
if action == "": if action == "":
next_episode(title, episode, player) next_episode(title, episode, player)
if wanna_continu_watch(): wanna_update_title_after_watch(title, episode, score)
continue break
else:
wanna_update_title_after_watch(title, episode, score)
break
elif action == "n" or action == "N": elif action == "n" or action == "N":
next_episode(title, episode, player) next_episode(title, episode, player)
if wanna_continu_watch(): wanna_update_title_after_watch(title, episode, score)
continue break
else:
wanna_update_title_after_watch(title, episode, score)
break
elif action == "l" or action == "L": elif action == "l" or action == "L":
all_from_last(title, episode,last_episode, player) all_from_last(title, episode,last_episode, player)
wanna_update_title_after_watch(title, episode, score) wanna_update_title_after_watch(title, episode, score)
@ -247,7 +254,6 @@ while True:
update_question(title, episode, score) update_question(title, episode, score)
break break
elif action == "s" or action == "S": elif action == "s" or action == "S":
wanna_update_title_after_watch(title, episode, score)
break break
else: else:
exit_ask() exit_ask()