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