archive plugin
This commit is contained in:
parent
1912b5baf0
commit
a02733a926
4 changed files with 26 additions and 14 deletions
plugins/qbittorrent
|
@ -17,6 +17,7 @@ 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"
|
||||
|
@ -26,6 +27,21 @@ import (
|
|||
"go.opentelemetry.io/otel"
|
||||
)
|
||||
|
||||
type QBittorrentPlugin struct {
|
||||
}
|
||||
|
||||
var _ tstor.Plugin = (*QBittorrentPlugin)(nil)
|
||||
|
||||
func (QBittorrentPlugin) Name() string {
|
||||
return daemonName
|
||||
}
|
||||
|
||||
var _ tstor.DaemonPlugin = (*QBittorrentPlugin)(nil)
|
||||
|
||||
func (QBittorrentPlugin) NewDaemon(ctx context.Context, koanf *koanf.Koanf) (daemon.Daemon, error) {
|
||||
return newDaemon(ctx, koanf)
|
||||
}
|
||||
|
||||
var trace = otel.Tracer("git.kmsign.ru/royalcat/tstor/plugins/qbittorrent")
|
||||
|
||||
type Daemon struct {
|
||||
|
@ -53,14 +69,7 @@ WebUI\Password_PBKDF2="@ByteArray(qef5I4wZBkDG+PP6/5mQwA==:LoTmorQM/QM5RHI4+dOiu
|
|||
|
||||
const daemonName = "qbittorrent"
|
||||
|
||||
type QBittorrentPlugin struct {
|
||||
}
|
||||
|
||||
func (QBittorrentPlugin) Name() string {
|
||||
return daemonName
|
||||
}
|
||||
|
||||
func (QBittorrentPlugin) NewDaemon(ctx context.Context, koanf *koanf.Koanf) (daemon.Daemon, error) {
|
||||
func newDaemon(ctx context.Context, koanf *koanf.Koanf) (daemon.Daemon, error) {
|
||||
log := rlog.Component(daemonName)
|
||||
|
||||
log.Debug(ctx, "QBittorrent plugin loaded. Starting qbittorrent-nox")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue