Commit 825313f772
Unsigned
Layout: unified · split
curd.py +8 −2
| @@ -24,7 +24,6 @@ from select_anime import extract_anime_info | ||
| 24 | 24 | from select_anime import select_anime |
| 25 | 25 | from track_anime import add_anime, update_anime, get_all_anime, delete_anime, find_anime |
| 26 | 26 | |
| 27 | mark_episode_as_completed_at = 85 | |
| 28 | 27 | discord_client_id = "1287457464148820089" |
| 29 | 28 | |
| 30 | 29 | def get_contents_of(tmp_file_name): |
| @@ -80,6 +79,7 @@ default_config = { | ||
| 80 | 79 | "history_file":"$HOME/.local/share/curd/curd_history.txt", |
| 81 | 80 | "subs_language":"english", |
| 82 | 81 | "sub_or_dub":"sub", |
| 82 | "percentage_to_mark_complete":85, | |
| 83 | 83 | "next_episode_prompt": False, |
| 84 | 84 | "score_on_completion": True, |
| 85 | 85 | "save_mpv_speed": True, |
| @@ -157,6 +157,11 @@ def load_config() -> dict: | ||
| 157 | 157 | elif value.lower() == "false": |
| 158 | 158 | value = False |
| 159 | 159 | |
| 160 | try: | |
| 161 | value = int(value) | |
| 162 | except: | |
| 163 | pass | |
| 164 | ||
| 160 | 165 | # Store in the dictionary |
| 161 | 166 | config_dict[key] = value |
| 162 | 167 | |
| @@ -226,7 +231,8 @@ if args.new: | ||
| 226 | 231 | print("No anime found") |
| 227 | 232 | |
| 228 | 233 | user_id, user_name = get_anilist_user_id(access_token) |
| 229 | ||
| 234 | mark_episode_as_completed_at = get_userconfig_value(user_config, "percentage_to_mark_complete") | |
| 235 | print(mark_episode_as_completed_at) | |
| 230 | 236 | |
| 231 | 237 | anilist_user_data = download_anilist_data(access_token, user_id) |
| 232 | 238 | anime_dict = extract_anime_info(anilist_user_data)[0] |