Commit bf78e28bfb
Unsigned
Layout: unified · split
cmd/curd/main.go +5 −1
| @@ -190,7 +190,7 @@ func main() { | ||
| 190 | 190 | internal.Log("Error finding anime by Anilist ID: " + err.Error()) |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | if anime.TotalEpisodes == temp_anime.Progress { | |
| 193 | if anime.TotalEpisodes == temp_anime.Progress && temp_anime.Status != "CURRENT" { | |
| 194 | 194 | internal.Log(temp_anime.Progress) |
| 195 | 195 | internal.Log(anime.TotalEpisodes) |
| 196 | 196 | internal.Log(user.AnimeList) |
| @@ -567,6 +567,10 @@ func main() { | ||
| 567 | 567 | internal.StartNextEpisode(&anime, &userCurdConfig, databaseFile, user.Token) |
| 568 | 568 | } else { |
| 569 | 569 | // Episode was already marked as completed above |
| 570 | // Handle completion if this was the last episode | |
| 571 | if anime.Ep.Number == anime.TotalEpisodes { | |
| 572 | internal.HandleLastEpisodeCompletion(&userCurdConfig, &anime, user.Token) | |
| 573 | } | |
| 570 | 574 | // Update local database with completed episode |
| 571 | 575 | err := internal.LocalUpdateAnime(databaseFile, anime.AnilistId, anime.AllanimeId, anime.Ep.Number, anime.Ep.Player.PlaybackTime, internal.ConvertSecondsToMinutes(anime.Ep.Duration), internal.GetAnimeName(anime)) |
| 572 | 576 | if err != nil { |
internal/curd.go +5
| @@ -1469,6 +1469,11 @@ func NextEpisodePromptContinuous(userCurdConfig *CurdConfig, databaseFile string | ||
| 1469 | 1469 | // Episode is considered completed, mark it and update progress |
| 1470 | 1470 | anime.Ep.IsCompleted = true |
| 1471 | 1471 | |
| 1472 | // Handle completion if this was the last episode | |
| 1473 | if anime.Ep.Number == anime.TotalEpisodes { | |
| 1474 | HandleLastEpisodeCompletion(userCurdConfig, anime, userToken) | |
| 1475 | } | |
| 1476 | ||
| 1472 | 1477 | // Update local database |
| 1473 | 1478 | err = LocalUpdateAnime(databaseFile, anime.AnilistId, anime.AllanimeId, anime.Ep.Number, anime.Ep.Player.PlaybackTime, ConvertSecondsToMinutes(anime.Ep.Duration), GetAnimeName(*anime)) |
| 1474 | 1479 | if err != nil { |