diff --git a/DeleteArr.go b/DeleteArr.go index cbc9cd1..ff69ef6 100644 --- a/DeleteArr.go +++ b/DeleteArr.go @@ -61,10 +61,10 @@ func NewConfig(configPath string) (*Config, error) { } func (m *MediaFiles) SendGotify(message string, arr string, cfg *Config) { - - http.PostForm(cfg.Gotify.ServerURL+"/message?token="+cfg.Gotify.Token, - url.Values{"message": {message}, "title": {"Deleting Media from " + arr}, "priority": {"10"}}) - + if cfg.Gotify.Enabled { + http.PostForm(cfg.Gotify.ServerURL+"/message?token="+cfg.Gotify.Token, + url.Values{"message": {message}, "title": {"Deleting Media from " + arr}, "priority": {"10"}}) + } } func (m *MediaFiles) IsInFolder(cfg *Config) {