Commit f859003a0a
Unsigned
Layout: unified · split
internal/structs.go +32 −23
| @@ -1,41 +1,50 @@ | |||
| 1 | package internal | 1 | package internal |
| 2 | 2 | ||
| 3 | type AnimeTitle struct { | 3 | type AnimeTitle struct { |
| 4 | Romaji string | 4 | Romaji string `json:"title_romanji"` |
| 5 | English string | 5 | English string `json:"title"` |
| 6 | Japanese string | 6 | Japanese string `json:"title_japanese"` |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | type Anime struct { | 9 | type Anime struct { |
| 10 | Title AnimeTitle | 10 | Title AnimeTitle `json:"title"` |
| 11 | Ep Episode | 11 | Ep Episode `json:"ep"` |
| 12 | TotalEpisodes int | 12 | CoverImage string `json:"url"` // Assuming this field corresponds to the cover image URL |
| 13 | MalId int | 13 | TotalEpisodes int `json:"total_episodes"` // If provided by the API |
| 14 | AnilistId int | 14 | MalId int `json:"mal_id"` |
| 15 | AllanimeId string | 15 | AnilistId int `json:"anilist_id"` // Assuming you have an Anilist ID in your struct |
| 16 | AllanimeId string // Can be populated as necessary | ||
| 17 | } | ||
| 18 | |||
| 19 | type Skip struct { | ||
| 20 | Start int `json:"start"` | ||
| 21 | End int `json:"end"` | ||
| 16 | } | 22 | } |
| 17 | 23 | ||
| 18 | type SkipTimes struct { | 24 | type SkipTimes struct { |
| 19 | Op int | 25 | Op Skip `json:"op"` |
| 20 | Ed int | 26 | Ed Skip `json:"ed"` |
| 21 | } | 27 | } |
| 22 | 28 | ||
| 23 | type Episode struct { | 29 | type Episode struct { |
| 24 | Tit AnimeTitle | 30 | Title AnimeTitle `json:"title"` |
| 25 | Number int | 31 | Number int `json:"number"` |
| 26 | Skip_times SkipTimes | 32 | SkipTimes SkipTimes `json:"skip_times"` |
| 27 | Player playingVideo | 33 | Player playingVideo `json:"player"` |
| 28 | Links []string | 34 | Resume bool `json:"resume"` |
| 29 | Is_filler bool | 35 | Started bool `json:"started"` |
| 30 | Is_recap bool | 36 | Duration int `json:"duration"` |
| 31 | Aired string | 37 | Links []string `json:"links"` |
| 32 | Synopsis string | 38 | IsFiller bool `json:"filler"` |
| 39 | IsRecap bool `json:"recap"` | ||
| 40 | Aired string `json:"aired"` | ||
| 41 | Synopsis string `json:"synopsis"` | ||
| 33 | } | 42 | } |
| 34 | 43 | ||
| 35 | type playingVideo struct { | 44 | type playingVideo struct { |
| 36 | Url string | 45 | Url string |
| 37 | Speed float64 | 46 | Speed float64 `json:"speed"` |
| 38 | PlaybackTime int | 47 | PlaybackTime int `json:"playback_time"` |
| 39 | } | 48 | } |
| 40 | 49 | ||
| 41 | type User struct { | 50 | type User struct { |