Skip to content

Commit

Permalink
3.1.3: Minor bug fixes (#64)
Browse files Browse the repository at this point in the history
* Swap address logic to use generic strings instead of IPs

* Bump github.com/gin-gonic/gin from 1.8.2 to 1.9.0 (#60)

Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](gin-gonic/gin@v1.8.2...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use Vite and cleanup some old deps for frontend (#61)

* Replace react-scripts with vite

* Clean up some packages

* Replace moment with date-fns

* Move schedule text

* Cleanup effects

* equalfold file extension and ignore extension in ignore check

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Rijswijk <[email protected]>
  • Loading branch information
3 people authored Jun 2, 2023
1 parent 5b80d7e commit e76eafa
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion check/checkrr.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (c *Checkrr) Run() {

ext := filepath.Ext(path)
for _, v := range c.ignoreExts {
if v == ext {
if strings.EqualFold(v, ext) {
ignore = true
}
}
Expand Down
7 changes: 3 additions & 4 deletions connections/lidarr.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package connections

import (
"fmt"
"net"
"strings"

log "github.com/sirupsen/logrus"
Expand All @@ -16,15 +15,15 @@ type Lidarr struct {
server *lidarr.Lidarr
Process bool
ApiKey string
Address net.IPAddr
Address string
Port int
BaseURL string
pathMaps map[string]string
}

func (l *Lidarr) FromConfig(conf *viper.Viper) {
if conf != nil {
l.Address = net.IPAddr{IP: net.ParseIP(conf.GetString("address"))}
l.Address = conf.GetString("address")
l.Process = conf.GetBool("process")
l.ApiKey = conf.GetString("apikey")
l.Port = conf.GetInt("port")
Expand Down Expand Up @@ -88,7 +87,7 @@ func (l *Lidarr) RemoveFile(path string) bool {
func (l *Lidarr) Connect() (bool, string) {
if l.Process {
if l.ApiKey != "" {
l.config = starr.New(l.ApiKey, fmt.Sprintf("http://%s:%v%v", l.Address.IP.String(), l.Port, l.BaseURL), 0)
l.config = starr.New(l.ApiKey, fmt.Sprintf("http://%s:%v%v", l.Address, l.Port, l.BaseURL), 0)
l.server = lidarr.New(l.config)
status, err := l.server.GetSystemStatus()
if err != nil {
Expand Down
7 changes: 3 additions & 4 deletions connections/radarr.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package connections

import (
"fmt"
"net"
"strings"

log "github.com/sirupsen/logrus"
Expand All @@ -16,15 +15,15 @@ type Radarr struct {
server *radarr.Radarr
Process bool
ApiKey string
Address net.IPAddr
Address string
Port int
BaseURL string
pathMaps map[string]string
}

func (r *Radarr) FromConfig(conf *viper.Viper) {
if conf != nil {
r.Address = net.IPAddr{IP: net.ParseIP(conf.GetString("address"))}
r.Address = conf.GetString("address")
r.Process = conf.GetBool("process")
r.ApiKey = conf.GetString("apikey")
r.Port = conf.GetInt("port")
Expand Down Expand Up @@ -67,7 +66,7 @@ func (r *Radarr) RemoveFile(path string) bool {
func (r *Radarr) Connect() (bool, string) {
if r.Process {
if r.ApiKey != "" {
r.config = starr.New(r.ApiKey, fmt.Sprintf("http://%s:%v%v", r.Address.IP.String(), r.Port, r.BaseURL), 0)
r.config = starr.New(r.ApiKey, fmt.Sprintf("http://%s:%v%v", r.Address, r.Port, r.BaseURL), 0)
r.server = radarr.New(r.config)
status, err := r.server.GetSystemStatus()
if err != nil {
Expand Down
7 changes: 3 additions & 4 deletions connections/sonarr.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package connections

import (
"fmt"
"net"
"strings"

log "github.com/sirupsen/logrus"
Expand All @@ -16,15 +15,15 @@ type Sonarr struct {
server *sonarr.Sonarr
Process bool
ApiKey string
Address net.IPAddr
Address string
Port int
BaseURL string
pathMaps map[string]string
}

func (s *Sonarr) FromConfig(conf *viper.Viper) {
if conf != nil {
s.Address = net.IPAddr{IP: net.ParseIP(conf.GetString("address"))}
s.Address = conf.GetString("address")
s.Process = conf.GetBool("process")
s.ApiKey = conf.GetString("apikey")
s.Port = conf.GetInt("port")
Expand Down Expand Up @@ -70,7 +69,7 @@ func (s *Sonarr) RemoveFile(path string) bool {
func (s *Sonarr) Connect() (bool, string) {
if s.Process {
if s.ApiKey != "" {
s.config = starr.New(s.ApiKey, fmt.Sprintf("http://%s:%v%v", s.Address.IP.String(), s.Port, s.BaseURL), 0)
s.config = starr.New(s.ApiKey, fmt.Sprintf("http://%s:%v%v", s.Address, s.Port, s.BaseURL), 0)
s.server = sonarr.New(s.config)
status, err := s.server.GetSystemStatus()
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG
github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
github.com/sasha-s/go-csync v0.0.0-20210812194225-61421b77c44b h1:qYTY2tN72LhgDj2rtWG+LI6TXFl2ygFQQ4YezfVaGQE=
github.com/sasha-s/go-csync v0.0.0-20210812194225-61421b77c44b/go.mod h1:/pA7k3zsXKdjjAiUhB5CjuKib9KJGCaLvZwtxGC8U0s=
Expand Down

0 comments on commit e76eafa

Please sign in to comment.