internal/providers/anipub/types.go
51 lines · 1050 bytes
1package anipub
2
3// SearchItem is stored in SelectionOption.ExtraData for mapping hints.
4type SearchItem struct {
5 ID int
6 MalID int
7 Name string
8 Finder string
9 Episodes int
10}
11
12type searchResult struct {
13 Name string `json:"Name"`
14 ID int `json:"Id"`
15 Image string `json:"Image"`
16 Finder string `json:"finder"`
17}
18
19type infoResponse struct {
20 ID int `json:"_id"`
21 Name string `json:"Name"`
22 MALID string `json:"MALID"`
23 EpCount int `json:"epCount"`
24 Image string `json:"ImagePath"`
25 Cover string `json:"Cover"`
26}
27
28type detailsResponse struct {
29 Local localDetails `json:"local"`
30}
31
32type localDetails struct {
33 Link string `json:"link"`
34 Ep []episodeLink `json:"ep"`
35}
36
37type episodeLink struct {
38 Link string `json:"link"`
39}
40
41type megaplaySourcesResponse struct {
42 Sources struct {
43 File string `json:"file"`
44 } `json:"sources"`
45 Tracks []struct {
46 File string `json:"file"`
47 Label string `json:"label"`
48 Kind string `json:"kind"`
49 Default bool `json:"default"`
50 } `json:"tracks"`
51}