From 687669f6f9331f5c054daabc2e0bfe5b96cb9f34 Mon Sep 17 00:00:00 2001 From: David Newhall Date: Wed, 7 Feb 2024 14:06:45 -0800 Subject: [PATCH 1/6] Update README.md --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 79cd3cd60..87f0706ae 100644 --- a/README.md +++ b/README.md @@ -550,18 +550,18 @@ integrations are used for things like storage, building, compiling, distribution documentation support. This project succeeds because of them. Thank you!

- - - - - - + + + + + +

## Contributing -Yes, please. +Join us on Discord and we can discuss. ## License -[MIT](https://github.com/Notifiarr/notifiarr/blob/main/LICENSE) - Copyright (c) 2020-2022 Go Lift +[MIT](https://github.com/Notifiarr/notifiarr/blob/main/LICENSE) - Copyright (c) 2020-2024 Go Lift From a92e36bea17ef6455a089501779222921fa346c5 Mon Sep 17 00:00:00 2001 From: David Newhall II Date: Wed, 7 Feb 2024 20:27:34 -0800 Subject: [PATCH 2/6] cleanup sync naming --- pkg/bindata/templates/triggers.html | 8 ++++---- pkg/triggers/cfsync/radarr.go | 16 ++++++++-------- pkg/triggers/cfsync/sonarr.go | 16 ++++++++-------- pkg/triggers/handler.go | 16 ++++++++-------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pkg/bindata/templates/triggers.html b/pkg/bindata/templates/triggers.html index 99d601cbe..e3f47659b 100644 --- a/pkg/bindata/templates/triggers.html +++ b/pkg/bindata/templates/triggers.html @@ -26,17 +26,17 @@

Triggers

Description - {{index .Expvar.TimerCounts "Starting Radarr TRaSH Profiles sync."}} + {{index .Expvar.TimerCounts "Starting Radarr profile and format sync."}} {{.ClientInfo.Actions.Sync.Interval}} - Radarr TRaSH SyncSyncs customized TRaSH profiles to Radarr. + Radarr TRaSH SyncSync custom profiles and formats to Radarr. - {{index .Expvar.TimerCounts "Starting Sonarr TRaSH Profiles sync."}} + {{index .Expvar.TimerCounts "Starting Sonarr profile and format sync."}} {{.ClientInfo.Actions.Sync.Interval}} - Sonarr TRaSH SyncSyncs customized TRaSH profiles to Sonarr. + Sonarr TRaSH SyncSync custom profiles and formats to Sonarr. diff --git a/pkg/triggers/cfsync/radarr.go b/pkg/triggers/cfsync/radarr.go index 031214fa0..564d043f4 100644 --- a/pkg/triggers/cfsync/radarr.go +++ b/pkg/triggers/cfsync/radarr.go @@ -14,8 +14,8 @@ import ( ) const ( - TrigCFSyncRadarr common.TriggerName = "Starting Radarr TRaSH Profiles sync." - TrigCFSyncRadarrInt common.TriggerName = "Starting Radarr %d TRaSH Profiles sync." + TrigCFSyncRadarr common.TriggerName = "Starting Radarr profile and format sync." + TrigCFSyncRadarrInt common.TriggerName = "Starting Radarr %d profile and format sync." ) // RadarrTrashPayload is the payload sent and received @@ -49,17 +49,17 @@ func (a *Action) SyncRadarrInstanceCF(event website.EventType, instance int) err func (c *cmd) syncRadarr(ctx context.Context, input *common.ActionInput) { ci := clientinfo.Get() if ci == nil || len(ci.Actions.Sync.RadarrInstances) < 1 { - c.Debugf("[%s requested] Cannot sync Radarr Custom Formats. Website provided 0 instances.", input.Type) + c.Debugf("[%s requested] Cannot sync Radarr profiles and formats. Website provided 0 instances.", input.Type) return } else if len(c.Apps.Radarr) < 1 { - c.Debugf("[%s requested] Cannot sync Radarr Custom Formats. No Radarr instances configured.", input.Type) + c.Debugf("[%s requested] Cannot sync Radarr profiles and formats. No Radarr instances configured.", input.Type) return } for idx, app := range c.Apps.Radarr { instance := idx + 1 if !app.Enabled() || !ci.Actions.Sync.RadarrInstances.Has(instance) { - c.Debugf("[%s requested] CF Sync Skipping Radarr instance %d. Not in sync list: %v", + c.Debugf("[%s requested] Profiles and formats sync skipping Radarr instance %d. Not in sync list: %v", input.Type, instance, ci.Actions.Sync.RadarrInstances) continue } @@ -78,10 +78,10 @@ func (c *radarrApp) syncRadarr(ctx context.Context, input *common.ActionInput) { Event: input.Type, Params: []string{"app=radarr"}, Payload: payload, - LogMsg: fmt.Sprintf("Radarr TRaSH Sync (elapsed: %v)", time.Since(start).Round(time.Millisecond)), + LogMsg: fmt.Sprintf("Radarr profiles and formats sync (elapsed: %v)", time.Since(start).Round(time.Millisecond)), LogPayload: true, }) - c.cmd.Printf("[%s requested] Synced Custom Formats for Radarr instance %d (%s/%s)", + c.cmd.Printf("[%s requested] Synced profiles and formats for Radarr instance %d (%s/%s)", input.Type, c.idx+1, c.app.Name, c.app.URL) } @@ -138,7 +138,7 @@ func (c *cmd) aggregateTrashRadarr( if app.Enabled() { output = append(output, &RadarrTrashPayload{Instance: instance, Name: app.Name}) } else { - c.Errorf("[%s requested] Aggegregate request for disabled Radarr instance %d (%s)", event, instance, app.Name) + c.Errorf("[%s requested] Profiles and formats aggregate for disabled Radarr instance %d (%s)", event, instance, app.Name) } } } diff --git a/pkg/triggers/cfsync/sonarr.go b/pkg/triggers/cfsync/sonarr.go index 0839e4e95..39b9fe2bf 100644 --- a/pkg/triggers/cfsync/sonarr.go +++ b/pkg/triggers/cfsync/sonarr.go @@ -15,8 +15,8 @@ import ( ) const ( - TrigRPSyncSonarr common.TriggerName = "Starting Sonarr TRaSH Profiles sync." - TrigRPSyncSonarrInt common.TriggerName = "Starting Sonarr %d TRaSH Profiles sync." + TrigRPSyncSonarr common.TriggerName = "Starting Sonarr profile and format sync." + TrigRPSyncSonarrInt common.TriggerName = "Starting Sonarr %d profile and format sync." ) // SonarrTrashPayload is the payload sent and received @@ -50,17 +50,17 @@ func (a *Action) SyncSonarrInstanceRP(event website.EventType, instance int) err func (c *cmd) syncSonarr(ctx context.Context, input *common.ActionInput) { ci := clientinfo.Get() if ci == nil || len(ci.Actions.Sync.SonarrInstances) < 1 { - c.Debugf("[%s requested] Cannot sync Sonarr Release Profiles. Website provided 0 instances.", input.Type) + c.Debugf("[%s requested] Cannot sync Sonarr profiles and formats. Website provided 0 instances.", input.Type) return } else if len(c.Apps.Sonarr) < 1 { - c.Debugf("[%s requested] Cannot sync Sonarr Release Profiles. No Sonarr instances configured.", input.Type) + c.Debugf("[%s requested] Cannot sync Sonarr profiles and formats. No Sonarr instances configured.", input.Type) return } for idx, app := range c.Apps.Sonarr { instance := idx + 1 if !app.Enabled() || !ci.Actions.Sync.SonarrInstances.Has(instance) { - c.Debugf("[%s requested] CF Sync Skipping Sonarr instance %d. Not in sync list: %v", + c.Debugf("[%s requested] Profiles and formats sync skipping Sonarr instance %d. Not in sync list: %v", input.Type, instance, ci.Actions.Sync.SonarrInstances) continue } @@ -78,10 +78,10 @@ func (c *sonarrApp) syncSonarr(ctx context.Context, input *common.ActionInput) { Event: input.Type, Params: []string{"app=sonarr"}, Payload: payload, - LogMsg: fmt.Sprintf("Sonarr TRaSH Sync (elapsed: %v)", time.Since(start).Round(time.Millisecond)), + LogMsg: fmt.Sprintf("Sonarr profiles and formats sync (elapsed: %v)", time.Since(start).Round(time.Millisecond)), LogPayload: true, }) - c.cmd.Printf("[%s requested] Synced Release Profiles for Sonarr instance %d (%s/%s)", + c.cmd.Printf("[%s requested] Synced profiles and formats for Sonarr instance %d (%s/%s)", input.Type, c.idx+1, c.app.Name, c.app.URL) } @@ -149,7 +149,7 @@ func (c *cmd) aggregateTrashSonarr( if app.Enabled() { output = append(output, &SonarrTrashPayload{Instance: instance, Name: app.Name}) } else { - c.Errorf("[%s requested] Aggegregate request for disabled Sonarr instance %d (%s)", event, instance, app.Name) + c.Errorf("[%s requested] Profiles and formats aggregate for disabled Sonarr instance %d (%s)", event, instance, app.Name) } } } diff --git a/pkg/triggers/handler.go b/pkg/triggers/handler.go index 771add507..16dd25aa6 100644 --- a/pkg/triggers/handler.go +++ b/pkg/triggers/handler.go @@ -242,7 +242,7 @@ func (a *Actions) command(input *common.ActionInput, content string) (int, strin return http.StatusOK, "Command triggered: " + cmd.Name } -// @Description Sync TRaSH Radarr data. +// @Description Sync custom profiles and formats to Radarr. // @Summary Sync TRaSH Radarr data // @Tags Triggers,TRaSH // @Produce json @@ -254,18 +254,18 @@ func (a *Actions) command(input *common.ActionInput, content string) (int, strin func (a *Actions) cfsync(input *common.ActionInput, content string) (int, string) { if content == "" { a.CFSync.SyncRadarrCF(input.Type) - return http.StatusOK, "TRaSH Custom Formats Radarr Sync initiated." + return http.StatusOK, "Radarr profile and format sync initiated." } instance, _ := strconv.Atoi(content) if err := a.CFSync.SyncRadarrInstanceCF(input.Type, instance); err != nil { - return http.StatusBadRequest, "TRaSH Custom Formats Radarr Sync failed for instance " + content + ": " + err.Error() + return http.StatusBadRequest, "Radarr profile and format sync initiated for instance " + content + ": " + err.Error() } - return http.StatusOK, "TRaSH Custom Formats Radarr Sync initiated for instance " + content + return http.StatusOK, "Radarr profile and format sync initiated for instance " + content } -// @Description Sync TRaSH Sonarr data. +// @Description Sync custom profiles and formats to Sonarr. // @Summary Sync TRaSH Sonarr data // @Tags Triggers,TRaSH // @Produce json @@ -277,15 +277,15 @@ func (a *Actions) cfsync(input *common.ActionInput, content string) (int, string func (a *Actions) rpsync(input *common.ActionInput, content string) (int, string) { if content == "" { a.CFSync.SyncSonarrRP(input.Type) - return http.StatusOK, "TRaSH Release Profile Sonarr Sync initiated." + return http.StatusOK, "Sonarr profile and format sync initiated." } instance, _ := strconv.Atoi(content) if err := a.CFSync.SyncSonarrInstanceRP(input.Type, instance); err != nil { - return http.StatusBadRequest, "TRaSH Release Profile Sonarr Sync failed for instance " + content + ": " + err.Error() + return http.StatusBadRequest, "Sonarr profile and format sync initiated for instance " + content + ": " + err.Error() } - return http.StatusOK, "TRaSH Release Profile Sonarr Sync initiated for instance " + content + return http.StatusOK, "Sonarr profile and format sync initiated for instance " + content } // @Description Reschedule all service checks to run immediately. From 012d16197b61347d40492e0f08855332299b6262 Mon Sep 17 00:00:00 2001 From: David Newhall II Date: Wed, 7 Feb 2024 20:32:25 -0800 Subject: [PATCH 3/6] linter --- pkg/triggers/cfsync/radarr.go | 3 ++- pkg/triggers/cfsync/sonarr.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/triggers/cfsync/radarr.go b/pkg/triggers/cfsync/radarr.go index 564d043f4..094e02d53 100644 --- a/pkg/triggers/cfsync/radarr.go +++ b/pkg/triggers/cfsync/radarr.go @@ -138,7 +138,8 @@ func (c *cmd) aggregateTrashRadarr( if app.Enabled() { output = append(output, &RadarrTrashPayload{Instance: instance, Name: app.Name}) } else { - c.Errorf("[%s requested] Profiles and formats aggregate for disabled Radarr instance %d (%s)", event, instance, app.Name) + c.Errorf("[%s requested] Profiles and formats aggregate for disabled Radarr instance %d (%s)", + event, instance, app.Name) } } } diff --git a/pkg/triggers/cfsync/sonarr.go b/pkg/triggers/cfsync/sonarr.go index 39b9fe2bf..26025007d 100644 --- a/pkg/triggers/cfsync/sonarr.go +++ b/pkg/triggers/cfsync/sonarr.go @@ -149,7 +149,8 @@ func (c *cmd) aggregateTrashSonarr( if app.Enabled() { output = append(output, &SonarrTrashPayload{Instance: instance, Name: app.Name}) } else { - c.Errorf("[%s requested] Profiles and formats aggregate for disabled Sonarr instance %d (%s)", event, instance, app.Name) + c.Errorf("[%s requested] Profiles and formats aggregate for disabled Sonarr instance %d (%s)", + event, instance, app.Name) } } } From 8a5e1a3fe7cb9ea1c9ab9de18240c421f8c8ff4c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 8 Feb 2024 18:28:37 +0000 Subject: [PATCH 4/6] fix(deps): update module golang.org/x/crypto to v0.19.0 --- go.mod | 4 ++-- go.sum | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 5c439b5b7..05de1871a 100644 --- a/go.mod +++ b/go.mod @@ -34,9 +34,9 @@ require ( github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace github.com/stretchr/testify v1.8.4 github.com/swaggo/swag v1.16.3 - golang.org/x/crypto v0.18.0 + golang.org/x/crypto v0.19.0 golang.org/x/mod v0.14.0 - golang.org/x/sys v0.16.0 + golang.org/x/sys v0.17.0 golang.org/x/text v0.14.0 golang.org/x/time v0.5.0 golift.io/cache v0.0.2 diff --git a/go.sum b/go.sum index 58b4b0917..71bb4d5bc 100644 --- a/go.sum +++ b/go.sum @@ -291,6 +291,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -385,6 +387,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= From 49f84e9a1c307aab5de7fdb9e4f0f123d72b2121 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 8 Feb 2024 18:28:48 +0000 Subject: [PATCH 5/6] fix(deps): update module golang.org/x/sys to v0.17.0 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 5c439b5b7..fada4ccfa 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/swaggo/swag v1.16.3 golang.org/x/crypto v0.18.0 golang.org/x/mod v0.14.0 - golang.org/x/sys v0.16.0 + golang.org/x/sys v0.17.0 golang.org/x/text v0.14.0 golang.org/x/time v0.5.0 golift.io/cache v0.0.2 diff --git a/go.sum b/go.sum index 58b4b0917..7d59a35cd 100644 --- a/go.sum +++ b/go.sum @@ -385,6 +385,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= From 90ae9b5dadf7cf0daaea041e72e318a84eef513d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 8 Feb 2024 18:31:10 +0000 Subject: [PATCH 6/6] fix(deps): update module golang.org/x/mod to v0.15.0 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 05de1871a..d830886db 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( github.com/stretchr/testify v1.8.4 github.com/swaggo/swag v1.16.3 golang.org/x/crypto v0.19.0 - golang.org/x/mod v0.14.0 + golang.org/x/mod v0.15.0 golang.org/x/sys v0.17.0 golang.org/x/text v0.14.0 golang.org/x/time v0.5.0 diff --git a/go.sum b/go.sum index 71bb4d5bc..05800da98 100644 --- a/go.sum +++ b/go.sum @@ -322,6 +322,8 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=