Commit bf78e28bfb

bf78e28bfb39df411237ee7ef432b0eb6abb1a4d

parent: 003fe6999a

Unsigned

Wraient <wraient.911@gmail.com> · 2026-01-05 09:01 UTC

Fix: finish watching an anime (it automatically gets moved to "completed" anilist
select the anime from "all" or "completed", confirm it being moved back into "watching", dont start from beginning.
finish watching said anime
observe that it stays in "watching" and is not moved back into "completed"

Layout: unified · split

cmd/curd/main.go +5 −1
@@ -190,7 +190,7 @@ func main() {
190 internal.Log("Error finding anime by Anilist ID: " + err.Error()) 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 internal.Log(temp_anime.Progress) 194 internal.Log(temp_anime.Progress)
195 internal.Log(anime.TotalEpisodes) 195 internal.Log(anime.TotalEpisodes)
196 internal.Log(user.AnimeList) 196 internal.Log(user.AnimeList)
@@ -567,6 +567,10 @@ func main() {
567 internal.StartNextEpisode(&anime, &userCurdConfig, databaseFile, user.Token) 567 internal.StartNextEpisode(&anime, &userCurdConfig, databaseFile, user.Token)
568 } else { 568 } else {
569 // Episode was already marked as completed above 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 // Update local database with completed episode 574 // Update local database with completed episode
571 err := internal.LocalUpdateAnime(databaseFile, anime.AnilistId, anime.AllanimeId, anime.Ep.Number, anime.Ep.Player.PlaybackTime, internal.ConvertSecondsToMinutes(anime.Ep.Duration), internal.GetAnimeName(anime)) 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 if err != nil { 576 if err != nil {
internal/curd.go +5
@@ -1469,6 +1469,11 @@ func NextEpisodePromptContinuous(userCurdConfig *CurdConfig, databaseFile string
1469 // Episode is considered completed, mark it and update progress 1469 // Episode is considered completed, mark it and update progress
1470 anime.Ep.IsCompleted = true 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 // Update local database 1477 // Update local database
1473 err = LocalUpdateAnime(databaseFile, anime.AnilistId, anime.AllanimeId, anime.Ep.Number, anime.Ep.Player.PlaybackTime, ConvertSecondsToMinutes(anime.Ep.Duration), GetAnimeName(*anime)) 1478 err = LocalUpdateAnime(databaseFile, anime.AnilistId, anime.AllanimeId, anime.Ep.Number, anime.Ep.Player.PlaybackTime, ConvertSecondsToMinutes(anime.Ep.Duration), GetAnimeName(*anime))
1474 if err != nil { 1479 if err != nil {