forked from Tommy647/gramarr
/
models.go
53 lines (45 loc) · 1.35 KB
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package radarr
import "fmt"
type Movie struct {
Title string `json:"title"`
TitleSlug string `json:"titleSlug"`
Year int `json:"year"`
PosterURL string `json:"remotePoster"`
TMDBID int `json:"tmdbId"`
Images []MovieImage `json:"images"`
}
func (m Movie) String() string {
if m.Year != 0 {
return fmt.Sprintf("%s (%d)", m.Title, m.Year)
} else {
return m.Title
}
}
type MovieImage struct {
CoverType string `json:"coverType"`
URL string `json:"url"`
}
type Profile struct {
Name string `json:"name"`
ID int `json:"id"`
}
type Folder struct {
Path string `json:"path"`
FreeSpace int64 `json:"freeSpace"`
ID int `json:"id"`
}
type AddMovieRequest struct {
Title string `json:"title"`
TitleSlug string `json:"titleSlug"`
Images []MovieImage `json:"images"`
QualityProfileID int `json:"qualityProfileId"`
LanguageProfileID int `json:"languageProfileId"`
TMDBID int `json:"tmdbId"`
RootFolderPath string `json:"rootFolderPath"`
Monitored bool `json:"monitored"`
AddOptions AddMovieOptions `json:"addOptions"`
Year int `json:"year"`
}
type AddMovieOptions struct {
SearchForMovie bool `json:"searchForMovie"`
}