-
Notifications
You must be signed in to change notification settings - Fork 2
/
command_type.go
73 lines (56 loc) · 1.97 KB
/
command_type.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
package radarr
// ImportMode can be used to override the default Copy for torrents with external preprocessing/transcoding/unrar.
type ImportMode int
const (
// Move imported files instead of copy
Move ImportMode = iota
// Copy Or Hardlink depending on Radarr configuration
Copy
)
// DownloadedMoviesScanOptions available options when using DownloadedMoviesScanCommand
type DownloadedMoviesScanOptions struct {
Path string `json:"path"`
DownloadClientID string `json:"downloadClientId"`
ImportMode ImportMode `json:"importMode"`
}
var availableImportMode [2]string = [2]string{"Move", "Copy"}
func (i ImportMode) String() string {
return availableImportMode[i]
}
type filter struct {
Key string `json:"filterKey"`
Value interface{} `json:"filterValue"`
}
// Here the list of all filters for movies
// If you have a better idea, please tell me
// I've been looking for every possible solution for seven hours... :'(
var availableFilter [7]filter = [7]filter{
{Key: "monitored", Value: true},
{Key: "monitored", Value: false},
{Key: "all", Value: "all"},
{Key: "status", Value: "available"},
{Key: "status", Value: "released"},
{Key: "status", Value: "inCinemas"},
{Key: "status", Value: "announced"},
}
// Filter filtering options when using MissingMoviesSearch and CutOffUnmetMoviesSearchCommand
type Filter int
const (
// FilterByMonitored filter movies by monitored ones
FilterByMonitored Filter = iota
// FilterByNonMonitored filter movies by non monitored ones
FilterByNonMonitored
// FilterAll return all movies without filters
FilterAll
// FilterByStatusAndAvailable return 'availables' movies
FilterByStatusAndAvailable
// FilterByStatusAndReleased return 'released' movies
FilterByStatusAndReleased
// FilterByStatusAndInCinemas return 'inCinemas' movies
FilterByStatusAndInCinemas
// FilterByStatusAndAnnounced return 'announced' movies
FilterByStatusAndAnnounced
)
func (f Filter) get() *filter {
return &availableFilter[f]
}