Commit a63ccd5936
Unsigned
Layout: unified · split
curd.py +10 −3
| @@ -208,15 +208,22 @@ while True: | ||
| 208 | 208 | # anime_watch_history[] |
| 209 | 209 | anime_history = find_anime(anime_watch_history, anilist_id=anime_id, allanime_id=get_contents_of("id")) |
| 210 | 210 | |
| 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 | |
| 212 | 212 | 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: | |
| 214 | 221 | mpv_args.append(f"--start={anime_history['time']}") |
| 215 | 222 | with open("scripts/tmp/ep_no", "w") as ep_no_file_2: |
| 216 | 223 | ep_no_file_2.write(anime_history['episode']) |
| 217 | 224 | print(f"STARTING ANIME FROM EPISODE {anime_history['episode']} {anime_history['time']}") |
| 218 | 225 | |
| 219 | watching_ep = anime_history['episode'] | |
| 226 | watching_ep = anime_history['episode'] | |
| 220 | 227 | # if : # if upstream is ahead |
| 221 | 228 | # pass |
| 222 | 229 | else: # if there is no history |