Commit d8688ad89b

d8688ad89b436d5a189dbdb51dc050f7557c82cc

parent: 1f990ab703

Unsigned

Wraient <wraient.911@gmail.com> · 2026-01-03 10:36 UTC

Fix: Completed Anime

Layout: unified · split

internal/curd.go +12 −14
@@ -1653,10 +1653,7 @@ func HandleLastEpisodeCompletion(userCurdConfig *CurdConfig, anime *Anime, userT
16531653 selectedOption, err := DynamicSelect(scoreOptions)
16541654 if err != nil {
16551655 Log(fmt.Sprintf("Error in score prompt selection: %v", err))
1656 return
1657 }
1658
1659 if selectedOption.Key == "yes" {
1656 } else if selectedOption.Key == "yes" {
16601657 err = RateAnime(userToken, anime.AnilistId)
16611658 if err != nil {
16621659 Log(fmt.Sprintf("Error rating anime: %v", err))
@@ -1666,17 +1663,18 @@ func HandleLastEpisodeCompletion(userCurdConfig *CurdConfig, anime *Anime, userT
16661663 }
16671664 }
16681665 // Back (-2) and no are treated as skip
1666 }
16691667
1670 // Update anime status to completed on AniList
1671 if !anime.Rewatching {
1672 go func() {
1673 err := UpdateAnimeStatus(userToken, anime.AnilistId, "COMPLETED")
1674 if err != nil {
1675 Log("Error updating anime status to completed: " + err.Error())
1676 }
1677 // Note: UpdateAnimeStatus already outputs a message on success
1678 }()
1679 }
1668 // Update anime status to completed on AniList
1669 // This is done regardless of scoring preference
1670 if anime.TotalEpisodes > 0 && anime.Ep.Number == anime.TotalEpisodes && !anime.Rewatching {
1671 go func() {
1672 err := UpdateAnimeStatus(userToken, anime.AnilistId, "COMPLETED")
1673 if err != nil {
1674 Log("Error updating anime status to completed: " + err.Error())
1675 }
1676 // Note: UpdateAnimeStatus already outputs a message on success
1677 }()
16801678 }
16811679
16821680 // Check for sequel after completion (only if this is the last episode)