diff --git a/DeleteArr.go b/DeleteArr.go index 6ab5d68..9989cb2 100644 --- a/DeleteArr.go +++ b/DeleteArr.go @@ -59,6 +59,11 @@ func main() { // os.Setenv("radarr_eventtype", "Download") // os.Setenv("EventType", "Test") + if os.Getenv("EventType") == "Test" { + log.Println("Radarr/Sonarr is testing the script and it works") + os.Exit(0) + } + ex, err := os.Executable() if err != nil { panic(err) @@ -76,11 +81,6 @@ func main() { RadarrEventType := os.Getenv("radarr_eventtype") SonarrEventType := os.Getenv("sonarr_eventtype") - if os.Getenv("EventType") == "Test" { - log.Println("Radarr/Sonarr is testing the script and it works") - os.Exit(1) - } - m := &MediaFiles{} if RadarrEventType != "" {