rework
This commit is contained in:
parent
e62df2e9fc
commit
1912b5baf0
39 changed files with 8489 additions and 476 deletions
plugins/qbittorrent
|
@ -17,7 +17,6 @@ import (
|
|||
"git.kmsign.ru/royalcat/tstor/server/src/daemon"
|
||||
"git.kmsign.ru/royalcat/tstor/server/src/logwrap"
|
||||
"git.kmsign.ru/royalcat/tstor/server/src/vfs"
|
||||
"git.kmsign.ru/royalcat/tstor/server/tstor"
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
"github.com/anacrolix/torrent/types/infohash"
|
||||
infohash_v2 "github.com/anacrolix/torrent/types/infohash-v2"
|
||||
|
@ -52,17 +51,17 @@ WebUI\LocalHostAuth=false
|
|||
WebUI\Password_PBKDF2="@ByteArray(qef5I4wZBkDG+PP6/5mQwA==:LoTmorQM/QM5RHI4+dOiu6xfAz9xak6fhR4ZGpRtJF3JNCGG081Yrtva4G71kXz//ODUuWQKTLlrZPuIDvzqUQ==)"
|
||||
`
|
||||
|
||||
var Plugin = &tstor.Plugin{
|
||||
Name: DaemonName,
|
||||
DaemonConstructor: NewDaemon,
|
||||
const daemonName = "qbittorrent"
|
||||
|
||||
type QBittorrentPlugin struct {
|
||||
}
|
||||
|
||||
const DaemonName = "qbittorrent"
|
||||
func (QBittorrentPlugin) Name() string {
|
||||
return daemonName
|
||||
}
|
||||
|
||||
var _ daemon.DaemonConstructor = NewDaemon
|
||||
|
||||
func NewDaemon(ctx context.Context, koanf *koanf.Koanf) (daemon.Daemon, error) {
|
||||
log := rlog.Component(DaemonName)
|
||||
func (QBittorrentPlugin) NewDaemon(ctx context.Context, koanf *koanf.Koanf) (daemon.Daemon, error) {
|
||||
log := rlog.Component(daemonName)
|
||||
|
||||
log.Debug(ctx, "QBittorrent plugin loaded. Starting qbittorrent-nox")
|
||||
|
||||
|
@ -143,12 +142,12 @@ func NewDaemon(ctx context.Context, koanf *koanf.Koanf) (daemon.Daemon, error) {
|
|||
sourceFiles: make(map[string]string),
|
||||
registeredTorrents: mapset.NewSet[string](),
|
||||
client: wrapClient(qb),
|
||||
log: rlog.Component(DaemonName),
|
||||
log: rlog.Component(daemonName),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (d *Daemon) Name() string {
|
||||
return DaemonName
|
||||
return daemonName
|
||||
}
|
||||
|
||||
func (d *Daemon) Extensions() []string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue