Commit a63ccd5936

a63ccd59366be7a684ea85c17fc609bd7a4d8d8d

parent: 77af5a89c6

Unsigned

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

parse history minor bug fix

Layout: unified · split

curd.py +10 −3
@@ -208,15 +208,22 @@ while True:
208208 # anime_watch_history[]
209209 anime_history = find_anime(anime_watch_history, anilist_id=anime_id, allanime_id=get_contents_of("id"))
210210
211 if anime_history and not (int(anime_history['episode']) < progress): # if it exists and if the progress is not ahead
211 if anime_history: # if it exists and if the progress is not ahead
212212 print(f"came in history {str(progress)}")
213 if int(anime_history['episode']) == int(progress)+1:
213 if int(anime_history['episode']) != progress+1:
214 with open("scripts/tmp/ep_no", "w") as ep_no_file_2:
215 ep_no_file_2.write(str(int(progress)+1))
216 print(f"Starting anime from upstream {str(progress + 1)}")
217
218 watching_ep = progress + 1
219
220 elif int(anime_history['episode']) == int(progress)+1:
214221 mpv_args.append(f"--start={anime_history['time']}")
215222 with open("scripts/tmp/ep_no", "w") as ep_no_file_2:
216223 ep_no_file_2.write(anime_history['episode'])
217224 print(f"STARTING ANIME FROM EPISODE {anime_history['episode']} {anime_history['time']}")
218225
219 watching_ep = anime_history['episode']
226 watching_ep = anime_history['episode']
220227 # if : # if upstream is ahead
221228 # pass
222229 else: # if there is no history