Commit 825313f772

825313f7721f616b993418ac07a25d044503e40f

parent: 7d92b0529c

Unsigned

Wraient <wraient.911@gmail.com> · 2024-09-24 20:37 UTC

percentage to mark complete is in conf

Layout: unified · split

curd.py +8 −2
@@ -24,7 +24,6 @@ from select_anime import extract_anime_info
2424from select_anime import select_anime
2525from track_anime import add_anime, update_anime, get_all_anime, delete_anime, find_anime
2626
27mark_episode_as_completed_at = 85
2827discord_client_id = "1287457464148820089"
2928
3029def get_contents_of(tmp_file_name):
@@ -80,6 +79,7 @@ default_config = {
8079 "history_file":"$HOME/.local/share/curd/curd_history.txt",
8180 "subs_language":"english",
8281 "sub_or_dub":"sub",
82 "percentage_to_mark_complete":85,
8383 "next_episode_prompt": False,
8484 "score_on_completion": True,
8585 "save_mpv_speed": True,
@@ -157,6 +157,11 @@ def load_config() -> dict:
157157 elif value.lower() == "false":
158158 value = False
159159
160 try:
161 value = int(value)
162 except:
163 pass
164
160165 # Store in the dictionary
161166 config_dict[key] = value
162167
@@ -226,7 +231,8 @@ if args.new:
226231 print("No anime found")
227232
228233user_id, user_name = get_anilist_user_id(access_token)
229
234mark_episode_as_completed_at = get_userconfig_value(user_config, "percentage_to_mark_complete")
235print(mark_episode_as_completed_at)
230236
231237anilist_user_data = download_anilist_data(access_token, user_id)
232238anime_dict = extract_anime_info(anilist_user_data)[0]