Commit 3a45c73812

3a45c73812ca088085673afd4a3cdbe4147b65d0

parent: 3f41dbdeef

Unregistered key

Rushikesh Gaikwad <81632222+Wraient@users.noreply.github.com> · 2024-10-02 09:07 UTC
committer: <noreply@github.com>

Continue from where you left off last time using -c

Layout: unified · split

curd.py +3 −3
@@ -1094,6 +1094,7 @@ parser = argparse.ArgumentParser(description="Print a greeting message.")
10941094parser.add_argument("-new", action='store_true', help="Add new anime to watching (optional)")
10951095parser.add_argument("-sub", action='store_true', help="Anime audio type (optional)")
10961096parser.add_argument("-dub", action='store_true', help="Anime audio type (optional)")
1097parser.add_argument("-c", action='store_true', help="Continue last watching anime (optional)")
10971098args = parser.parse_args()
10981099
10991100user_config = load_config() # python dictionary containing all the configs as key value pairs
@@ -1133,10 +1134,9 @@ if args.new:
11331134
11341135user_id, user_name = get_anilist_user_id(access_token)
11351136mark_episode_as_completed_at = get_userconfig_value(user_config, "percentage_to_mark_complete")
1136
11371137anilist_user_data = download_anilist_data(access_token, user_id)
11381138anime_dict = extract_anime_info(anilist_user_data)[0]
1139select_anime(anime_dict)
1139if not args.c: select_anime(anime_dict)
11401140anime_name = read_tmp("anime")
11411141write_to_tmp("query", anime_name)
11421142run_script("anime_list")
@@ -1425,4 +1425,4 @@ while True:
14251425 # print(f"error:{e}\nMaybe try running again!")
14261426 print_error(f"{e}")
14271427 print("Maybe try running again!")
1428 exit(1)
\ No newline at end of file
1428 exit(1)