This commit is contained in:
Gregory Salaun 2023-12-17 21:08:55 +07:00
parent 0982141e9b
commit 9bc2bfca04

View File

@ -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 != "" {