internal/providers/anipub/types.go

52 lines · 1078 bytes

7 symbols in this file
 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	Enc    string `json:"enc"`
46	Tracks []struct {
47		File    string `json:"file"`
48		Label   string `json:"label"`
49		Kind    string `json:"kind"`
50		Default bool   `json:"default"`
51	} `json:"tracks"`
52}