forked from golift/starr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
radarr.go
162 lines (144 loc) · 9.06 KB
/
radarr.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
//nolint:lll
package starrcmd
/*
All events accounted for; 1/30/2022
https://github.com/Radarr/Radarr/blob/develop/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs
*/
import (
"time"
)
// RadarrApplicationUpdate is the ApplicationUpdate event.
type RadarrApplicationUpdate struct {
PreviousVersion string `env:"radarr_update_previousversion"` // 4.0.3.5875
NewVersion string `env:"radarr_update_newversion"` // 4.0.4.5909
Message string `env:"radarr_update_message"` // Radarr updated from 4.0.3.5875 to 4.0.4.5909
}
// RadarrDownload is the Download event.
type RadarrDownload struct {
ReleaseDate time.Time `env:"radarr_movie_physical_release_date"`
FilePath string `env:"radarr_moviefile_path"` // /movies/Just Go with It (2011)/Just.Go.with.It.2011.Bluray-1080p.mkv
IMDbID string `env:"radarr_movie_imdbid"` // tt1564367
SceneName string `env:"radarr_moviefile_scenename"` // Just.Go.with.It.2011.1080p.BluRay.x264-OFT
FileID int64 `env:"radarr_moviefile_id"` // 3594
ReleaseGroup string `env:"radarr_moviefile_releasegroup"` // OFT
DownloadID string `env:"radarr_download_id"` // string F3D870942BFDD643488852284E917336170CEA00
InCinemas time.Time `env:"radarr_movie_in_cinemas_date"` // 2/10/2011 12:00:00 AM
SourceFolder string `env:"radarr_moviefile_sourcefolder"` // /downloads/Seeding/Just.Go.with.It.2011.1080p.BluRay.x264-OFT
Year int `env:"radarr_movie_year"` // 2011
IsUpgrade bool `env:"radarr_isupgrade"` // False
Path string `env:"radarr_movie_path"` // /movies/Just Go with It (2011)
RelativePath string `env:"radarr_moviefile_relativepath"` // Just.Go.with.It.2011.Bluray-1080p.mkv
DownloadClient string `env:"radarr_download_client"` // Deluge
SourcePath string `env:"radarr_moviefile_sourcepath"` // /downloads/Seeding/Just.Go.with.It.2011.1080p.BluRay.x264-OFT/Just.Go.with.It.2011.1080p.BluRay.x264-OFT.mkv
TMDbID int64 `env:"radarr_movie_tmdbid"` // 50546
ID int64 `env:"radarr_movie_id"` // 924
Quality string `env:"radarr_moviefile_quality"` // Bluray-1080p
Title string `env:"radarr_movie_title"` // Just Go with It
QualityVersion int64 `env:"radarr_moviefile_qualityversion"` // 1
DeletedRelativePaths []string `env:"radarr_deletedrelativepaths,|"`
DeletedPaths []string `env:"radarr_deletedpaths,|"`
}
// RadarrGrab is the Grab event.
type RadarrGrab struct {
QualityVersion int64 `env:"radarr_release_qualityversion"` // 1
ReleaseDate time.Time `env:"radarr_movie_physical_release_date"` // 1/19/2006 12:00:00 AM
ReleaseGroup string `env:"radarr_release_releasegroup"` // SLOT
IndexerFlags int64 `env:"radarr_indexerflags"` // 0
IMDbID string `env:"radarr_movie_imdbid"` // tt0448172
DownloadID string `env:"radarr_download_id"` // E63FAFFAAA0DEE42F0846348A9C0657BC53E7AA5
ReleaseTitle string `env:"radarr_release_title"` // 8MM 2 2005 1080p BluRay x264
InCinemas time.Time `env:"radarr_movie_in_cinemas_date"` // 11/22/2005 12:00:00 AM
Quality string `env:"radarr_release_quality"` // Bluray-1080p
Size int64 `env:"radarr_release_size"` // 2158221056
Year int `env:"radarr_movie_year"` // 2005
DownloadClient string `env:"radarr_download_client"` // Deluge
TMDbID int64 `env:"radarr_movie_tmdbid"` // 7295
ID int64 `env:"radarr_movie_id"` // 339
ReleaseIndexer string `env:"radarr_release_indexer"` // Inexilator (Prowlarr)
Title string `env:"radarr_movie_title"` // 8MM 2
}
// RadarrHealthIssue is the HealthIssue event.
type RadarrHealthIssue struct {
Message string `env:"radarr_health_issue_message"` // Lists unavailable due to failures: List name here
IssueType string `env:"radarr_health_issue_type"` // ImportListStatusCheck
Wiki string `env:"radarr_health_issue_wiki"` // https://wiki.servarr.com/radarr/system#lists-are-unavailable-due-to-failures
Level string `env:"radarr_health_issue_level"` // Warning
}
// RadarrMovieFileDelete is the MovieFileDelete event.
type RadarrMovieFileDelete struct {
Reason string `env:"radarr_moviefile_deletereason"` // Upgrade
FilePath string `env:"radarr_moviefile_path"` // /movies/The French Dispatch (2021)/The.French.Dispatch.2021.Bluray-720p.mkv
SceneName string `env:"radarr_moviefile_scenename"` // The.French.Dispatch.2021.720p.BluRay.x264-WoAT
IMDbID string `env:"radarr_movie_imdbid"` // tt8847712
FileID int64 `env:"radarr_moviefile_id"` // 3531
ReleaseGroup string `env:"radarr_moviefile_releasegroup"` // WoAT
Year int `env:"radarr_movie_year"` // 2021
Path string `env:"radarr_movie_path"` // /movies/The French Dispatch (2021)
RelativePath string `env:"radarr_moviefile_relativepath"` // The.French.Dispatch.2021.Bluray-720p.mkv
Size int64 `env:"radarr_moviefile_size"` // 3593317970
TMDbID string `env:"radarr_movie_tmdbid"` // 542178
ID int64 `env:"radarr_movie_id"` // 2173
Quality string `env:"radarr_moviefile_quality"` // Bluray-720p
Title string `env:"radarr_movie_title"` // The French Dispatch
QualityVersion int64 `env:"radarr_moviefile_qualityversion"` // 1
}
// RadarrMovieDelete is the MovieDelete event.
type RadarrMovieDelete struct {
ID int64 `env:"radarr_movie_id"` // 2173
Title string `env:"radarr_movie_title"` // The French Dispatch
Year int `env:"radarr_movie_year"` // 2021
Path string `env:"radarr_movie_path"` // /movies/The French Dispatch (2021)
IMDbID string `env:"radarr_movie_imdbid"` // tt8847712
TMDbID int64 `env:"radarr_movie_tmdbid"` // 542178
Size int64 `env:"radarr_movie_folder_size"` // 3593317970
DeleteFiles string `env:"radarr_movie_deletedfiles"` // XXX: no example. Does this need a split?
}
// RadarrRename is the Rename event.
type RadarrRename struct {
ID int64 `env:"radarr_movie_id"` // 2173
Year int `env:"radarr_movie_year"` // 2021
Path string `env:"radarr_movie_path"` // /movies/The French Dispatch (2021)
IMDbID string `env:"radarr_movie_imdbid"` // tt8847712
TMDbID int64 `env:"radarr_movie_tmdbid"` // 542178
InCinemas time.Time `env:"radarr_movie_in_cinemas_date"` // 11/22/2005 12:00:00 AM
ReleaseDate time.Time `env:"radarr_movie_physical_release_date"`
FileIDs []int64 `env:"radarr_moviefile_ids,,"`
RelativePaths []string `env:"radarr_moviefile_relativepaths,|"`
Paths []string `env:"radarr_moviefile_paths,|"`
PreviousRelativePaths []string `env:"radarr_moviefile_previousrelativepaths,|"`
PreviousPaths []string `env:"radarr_moviefile_previouspaths,|"`
}
// RadarrTest has no members.
type RadarrTest struct{}
// GetRadarrHealthIssue returns the HealthIssue event data.
func (c *CmdEvent) GetRadarrHealthIssue() (output RadarrHealthIssue, err error) {
return output, c.get(EventHealthIssue, &output)
}
// GetRadarrApplicationUpdate returns the ApplicationUpdate event data.
func (c *CmdEvent) GetRadarrApplicationUpdate() (output RadarrApplicationUpdate, err error) {
return output, c.get(EventApplicationUpdate, &output)
}
// GetRadarrDownload returns the Download event data.
func (c *CmdEvent) GetRadarrDownload() (output RadarrDownload, err error) {
return output, c.get(EventDownload, &output)
}
// GetRadarrGrab returns the Grab event data.
func (c *CmdEvent) GetRadarrGrab() (output RadarrGrab, err error) {
return output, c.get(EventGrab, &output)
}
// GetRadarrMovieFileDelete returns the MovieFileDelete event data.
func (c *CmdEvent) GetRadarrMovieFileDelete() (output RadarrMovieFileDelete, err error) {
return output, c.get(EventMovieFileDelete, &output)
}
// GetRadarrTest returns the Test event data.
func (c *CmdEvent) GetRadarrTest() (output RadarrTest, err error) {
return output, c.get(EventTest, &output)
}
// GetRadarrMovieDelete returns the MovieDelete event data.
func (c *CmdEvent) GetRadarrMovieDelete() (output RadarrMovieDelete, err error) {
return output, c.get(EventMovieDelete, &output)
}
// GetRadarrRename returns the Rename event data.
func (c *CmdEvent) GetRadarrRename() (output RadarrRename, err error) {
return output, c.get(EventRename, &output)
}