Commit 96ea30e758
Unsigned
Layout: unified · split
internal/anilist.go +9 −4
| @@ -46,6 +46,7 @@ func GetAnimeMap(animeList AnimeList) map[string]string { | |||
| 46 | populateMap(animeList.Paused) | 46 | populateMap(animeList.Paused) |
| 47 | populateMap(animeList.Dropped) | 47 | populateMap(animeList.Dropped) |
| 48 | populateMap(animeList.Planning) | 48 | populateMap(animeList.Planning) |
| 49 | populateMap(animeList.Rewatching) // Add Rewatching list | ||
| 49 | 50 | ||
| 50 | return animeMap | 51 | return animeMap |
| 51 | } | 52 | } |
| @@ -81,6 +82,7 @@ func GetAnimeMapPreview(animeList AnimeList) map[string]RofiSelectPreview { | |||
| 81 | populateMap(animeList.Paused) | 82 | populateMap(animeList.Paused) |
| 82 | populateMap(animeList.Dropped) | 83 | populateMap(animeList.Dropped) |
| 83 | populateMap(animeList.Planning) | 84 | populateMap(animeList.Planning) |
| 85 | populateMap(animeList.Rewatching) // Add Rewatching list | ||
| 84 | 86 | ||
| 85 | return animeMap | 87 | return animeMap |
| 86 | } | 88 | } |
| @@ -710,13 +712,15 @@ func ParseAnimeList(input map[string]interface{}) AnimeList { | |||
| 710 | case "CURRENT": | 712 | case "CURRENT": |
| 711 | animeList.Watching = append(animeList.Watching, animeEntry) | 713 | animeList.Watching = append(animeList.Watching, animeEntry) |
| 712 | case "COMPLETED": | 714 | case "COMPLETED": |
| 713 | animeList.Completed = append(animeList.Completed, animeEntry) // Fix: Ensure Completed list is used | 715 | animeList.Completed = append(animeList.Completed, animeEntry) |
| 714 | case "PAUSED": | 716 | case "PAUSED": |
| 715 | animeList.Paused = append(animeList.Paused, animeEntry) // Fix: Append to Paused list | 717 | animeList.Paused = append(animeList.Paused, animeEntry) |
| 716 | case "DROPPED": | 718 | case "DROPPED": |
| 717 | animeList.Dropped = append(animeList.Dropped, animeEntry) // Fix: Append to Dropped list | 719 | animeList.Dropped = append(animeList.Dropped, animeEntry) |
| 718 | case "PLANNING": | 720 | case "PLANNING": |
| 719 | animeList.Planning = append(animeList.Planning, animeEntry) // Fix: Append to Planning list | 721 | animeList.Planning = append(animeList.Planning, animeEntry) |
| 722 | case "REPEATING": // Anilist uses REPEATING for rewatching | ||
| 723 | animeList.Rewatching = append(animeList.Rewatching, animeEntry) | ||
| 720 | } | 724 | } |
| 721 | } | 725 | } |
| 722 | } | 726 | } |
| @@ -738,6 +742,7 @@ func FindAnimeByAnilistID(list AnimeList, idStr string) (*Entry, error) { | |||
| 738 | list.Paused, | 742 | list.Paused, |
| 739 | list.Dropped, | 743 | list.Dropped, |
| 740 | list.Planning, | 744 | list.Planning, |
| 745 | list.Rewatching, // Add Rewatching list | ||
| 741 | } | 746 | } |
| 742 | 747 | ||
| 743 | // Iterate through each category | 748 | // Iterate through each category |