Commit d8688ad89b
Unsigned
Layout: unified · split
internal/curd.go +12 −14
| @@ -1653,10 +1653,7 @@ func HandleLastEpisodeCompletion(userCurdConfig *CurdConfig, anime *Anime, userT | ||
| 1653 | 1653 | selectedOption, err := DynamicSelect(scoreOptions) |
| 1654 | 1654 | if err != nil { |
| 1655 | 1655 | 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" { | |
| 1660 | 1657 | err = RateAnime(userToken, anime.AnilistId) |
| 1661 | 1658 | if err != nil { |
| 1662 | 1659 | Log(fmt.Sprintf("Error rating anime: %v", err)) |
| @@ -1666,17 +1663,18 @@ func HandleLastEpisodeCompletion(userCurdConfig *CurdConfig, anime *Anime, userT | ||
| 1666 | 1663 | } |
| 1667 | 1664 | } |
| 1668 | 1665 | // Back (-2) and no are treated as skip |
| 1666 | } | |
| 1669 | 1667 | |
| 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 | }() | |
| 1680 | 1678 | } |
| 1681 | 1679 | |
| 1682 | 1680 | // Check for sequel after completion (only if this is the last episode) |