From 6eb07bc323e04785b5031c8332643b243d63f073 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Mon, 7 Mar 2022 23:45:31 +0530 Subject: fixed num_episodes_watched not working in anime package --- anime/anime.structs.go | 6 +++--- util/structs.go | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/anime/anime.structs.go b/anime/anime.structs.go index 4132989..9466232 100644 --- a/anime/anime.structs.go +++ b/anime/anime.structs.go @@ -21,8 +21,8 @@ import ( ) type AnimeStatistics struct { + NumListUsers int `json:"num_list_users"` Status u.StatusStatistics `json:"status"` - NumListUsers int `json:"num_list_users"` } type Broadcast struct { @@ -57,7 +57,7 @@ type ListStatus struct { UpdatedAt string `json:"updated_at"` // these fields are exclusive to anime - EpWatched int `json:"num_watched_episodes"` + EpWatched int `json:"num_episodes_watched"` IsRewatching bool `json:"is_rewatching"` TimesRewatched int `json:"num_times_rewatched"` RewatchValue int `json:"rewatch_value"` @@ -67,7 +67,7 @@ type Anime struct { Id int `json:"id"` Title string `json:"title"` MainPicture u.Picture `json:"main_picture"` - AltTitles u.AltTitles `json:"alternative_titles"` + AltTitles u.AltTitles `json:"alternative_titles"` StartDate string `json:"start_date"` EndDate string `json:"end_date"` Synopsis string `json:"synopsis"` diff --git a/util/structs.go b/util/structs.go index 600ec94..cb1f052 100644 --- a/util/structs.go +++ b/util/structs.go @@ -64,6 +64,7 @@ type Picture struct { Large string `json:"large"` } +// for some reason the API returns them as string type StatusStatistics struct { Watching string `json:"watching"` Completed string `json:"completed"` -- cgit v1.2.3