Commit 3a45c73812
Unregistered key
Layout: unified · split
curd.py +3 −3
| @@ -1094,6 +1094,7 @@ parser = argparse.ArgumentParser(description="Print a greeting message.") | |||
| 1094 | parser.add_argument("-new", action='store_true', help="Add new anime to watching (optional)") | 1094 | parser.add_argument("-new", action='store_true', help="Add new anime to watching (optional)") |
| 1095 | parser.add_argument("-sub", action='store_true', help="Anime audio type (optional)") | 1095 | parser.add_argument("-sub", action='store_true', help="Anime audio type (optional)") |
| 1096 | parser.add_argument("-dub", action='store_true', help="Anime audio type (optional)") | 1096 | parser.add_argument("-dub", action='store_true', help="Anime audio type (optional)") |
| 1097 | parser.add_argument("-c", action='store_true', help="Continue last watching anime (optional)") | ||
| 1097 | args = parser.parse_args() | 1098 | args = parser.parse_args() |
| 1098 | 1099 | ||
| 1099 | user_config = load_config() # python dictionary containing all the configs as key value pairs | 1100 | user_config = load_config() # python dictionary containing all the configs as key value pairs |
| @@ -1133,10 +1134,9 @@ if args.new: | |||
| 1133 | 1134 | ||
| 1134 | user_id, user_name = get_anilist_user_id(access_token) | 1135 | user_id, user_name = get_anilist_user_id(access_token) |
| 1135 | mark_episode_as_completed_at = get_userconfig_value(user_config, "percentage_to_mark_complete") | 1136 | mark_episode_as_completed_at = get_userconfig_value(user_config, "percentage_to_mark_complete") |
| 1136 | |||
| 1137 | anilist_user_data = download_anilist_data(access_token, user_id) | 1137 | anilist_user_data = download_anilist_data(access_token, user_id) |
| 1138 | anime_dict = extract_anime_info(anilist_user_data)[0] | 1138 | anime_dict = extract_anime_info(anilist_user_data)[0] |
| 1139 | select_anime(anime_dict) | 1139 | if not args.c: select_anime(anime_dict) |
| 1140 | anime_name = read_tmp("anime") | 1140 | anime_name = read_tmp("anime") |
| 1141 | write_to_tmp("query", anime_name) | 1141 | write_to_tmp("query", anime_name) |
| 1142 | run_script("anime_list") | 1142 | run_script("anime_list") |
| @@ -1425,4 +1425,4 @@ while True: | |||
| 1425 | # print(f"error:{e}\nMaybe try running again!") | 1425 | # print(f"error:{e}\nMaybe try running again!") |
| 1426 | print_error(f"{e}") | 1426 | print_error(f"{e}") |
| 1427 | print("Maybe try running again!") | 1427 | print("Maybe try running again!") |
| 1428 | exit(1)\ No newline at end of file | 1428 | exit(1) |