@@ -25,7 +25,6 @@ type Radarr struct {
25
25
qualityProfileId int
26
26
27
27
ignoresExpr []* vm.Program
28
- acceptsExpr []* vm.Program
29
28
}
30
29
31
30
type RadarrSystemStatus struct {
@@ -106,16 +105,6 @@ func (p *Radarr) compileExpressions() error {
106
105
p .ignoresExpr = append (p .ignoresExpr , program )
107
106
}
108
107
109
- // compile accepts
110
- for _ , acceptExpr := range p .cfg .Filters .Accepts {
111
- program , err := expr .Compile (acceptExpr , expr .Env (exprEnv ), expr .AsBool ())
112
- if err != nil {
113
- return errors .Wrapf (err , "failed compiling accept expression for: %q" , acceptExpr )
114
- }
115
-
116
- p .acceptsExpr = append (p .acceptsExpr , program )
117
- }
118
-
119
108
return nil
120
109
}
121
110
@@ -185,26 +174,6 @@ func (p *Radarr) ShouldIgnore(mediaItem *config.MediaItem) (bool, error) {
185
174
return false , nil
186
175
}
187
176
188
- func (p * Radarr ) ShouldAccept (mediaItem * config.MediaItem ) (bool , error ) {
189
- for _ , expression := range p .acceptsExpr {
190
- result , err := expr .Run (expression , mediaItem )
191
- if err != nil {
192
- return false , errors .Wrapf (err , "failed checking accept expression" )
193
- }
194
-
195
- expResult , ok := result .(bool )
196
- if ! ok {
197
- return false , errors .New ("failed type asserting accept expression result" )
198
- }
199
-
200
- if expResult {
201
- return true , nil
202
- }
203
- }
204
-
205
- return false , nil
206
- }
207
-
208
177
func (p * Radarr ) GetQualityProfileId (profileName string ) (int , error ) {
209
178
// send request
210
179
resp , err := web .GetResponse (web .GET , web .JoinURL (p .apiUrl , "/profile" ), 15 , p .reqHeaders ,
0 commit comments