Skip to content

Commit

Permalink
Merge branch 'main' into feature/env-config-support
Browse files Browse the repository at this point in the history
  • Loading branch information
soup committed Dec 22, 2024
2 parents 620542c + 6dfa149 commit 7d5526e
Show file tree
Hide file tree
Showing 6 changed files with 311 additions and 116 deletions.
8 changes: 4 additions & 4 deletions client/qbittorrent.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/autobrr/tqm/expression"
"github.com/autobrr/tqm/logger"
"github.com/autobrr/tqm/sliceutils"
"github.com/autobrr/tqm/stringutils"

qbit "github.com/autobrr/go-qbittorrent"
"github.com/dustin/go-humanize"
Expand Down Expand Up @@ -97,9 +96,10 @@ func (c *QBittorrent) Connect() error {
apiVersion, err := c.client.GetWebAPIVersion()
if err != nil {
return fmt.Errorf("get api version: %w", err)
} else if stringutils.Atof64(apiVersion[0:3], 0.0) < 2.2 {
return fmt.Errorf("unsupported webapi version: %v", apiVersion)
}
}
//else if stringutils.Atof64(apiVersion[0:3], 0.0) < 2.2 {
// return fmt.Errorf("unsupported webapi version: %v", apiVersion)
//}

c.log.Debugf("API Version: %v", apiVersion)
return nil
Expand Down
4 changes: 2 additions & 2 deletions expression/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/autobrr/tqm/config"

"github.com/antonmedv/expr"
"github.com/antonmedv/expr/vm"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/vm"
)

func CheckTorrentSingleMatch(t *config.Torrent, exp []*vm.Program) (bool, error) {
Expand Down
2 changes: 1 addition & 1 deletion expression/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/autobrr/tqm/config"

"github.com/antonmedv/expr"
"github.com/expr-lang/expr"
)

func Compile(filter *config.FilterConfiguration) (*Expressions, error) {
Expand Down
2 changes: 1 addition & 1 deletion expression/struct.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package expression

import "github.com/antonmedv/expr/vm"
import "github.com/expr-lang/expr/vm"

type Expressions struct {
Ignores []*vm.Program
Expand Down
63 changes: 28 additions & 35 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,55 @@ module github.com/autobrr/tqm
go 1.23

require (
github.com/antonmedv/expr v1.9.0
github.com/autobrr/go-qbittorrent v1.11.0
github.com/blang/semver v3.5.1+incompatible
github.com/bobesa/go-domain-util v0.0.0-20190911083921-4033b5f7dd89
github.com/dustin/go-humanize v1.0.0
github.com/gdm85/go-libdeluge v0.5.6
github.com/knadh/koanf v1.4.2
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/dustin/go-humanize v1.0.1
github.com/expr-lang/expr v1.16.9
github.com/gdm85/go-libdeluge v0.6.0
github.com/hashicorp/go-retryablehttp v0.7.7
github.com/knadh/koanf v1.5.0
github.com/lucperkins/rek v0.1.3
github.com/natefinch/lumberjack v2.0.0+incompatible
github.com/onsi/ginkgo v1.12.0 // indirect
github.com/onsi/gomega v1.9.0 // indirect
github.com/pkg/errors v0.9.1
github.com/rhysd/go-github-selfupdate v1.2.3
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.5.0
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.1
github.com/x-cray/logrus-prefixed-formatter v0.5.2
golang.org/x/crypto v0.30.0 // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
)

require (
github.com/autobrr/go-qbittorrent v1.11.0
github.com/hashicorp/go-retryablehttp v0.7.1
github.com/lucperkins/rek v0.1.3
go.uber.org/ratelimit v0.2.0
go.uber.org/ratelimit v0.3.1
)

require (
github.com/Masterminds/semver v1.5.0 // indirect
github.com/avast/retry-go v3.0.0+incompatible // indirect
)

require (
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/gdm85/go-rencode v0.1.8 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-github/v30 v30.1.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/nxadm/tail v1.4.11 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.36.1 // indirect
github.com/scylladb/go-set v1.0.3-0.20200225121959-cc7b2070d91e
github.com/spf13/pflag v1.0.5 // indirect
github.com/tcnksm/go-gitconfig v0.1.2 // indirect
github.com/ulikunitz/xz v0.5.12 // indirect
golang.org/x/crypto v0.30.0 // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 7d5526e

Please sign in to comment.