client

package
v1.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2026 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deluge

type Deluge struct {
	Host     *string `validate:"required"`
	Port     *uint   `validate:"required"`
	Login    *string `validate:"required"`
	Password *string `validate:"required"`
	V2       bool
	// contains filtered or unexported fields
}

func (*Deluge) AddFreeSpace

func (c *Deluge) AddFreeSpace(bytes int64)

func (*Deluge) CheckTorrentPause

func (c *Deluge) CheckTorrentPause(ctx context.Context, t *config.Torrent) (bool, error)

func (*Deluge) Connect

func (c *Deluge) Connect(ctx context.Context) error

func (*Deluge) GetCurrentFreeSpace

func (c *Deluge) GetCurrentFreeSpace(ctx context.Context, path string) (int64, error)

func (*Deluge) GetFreeSpace

func (c *Deluge) GetFreeSpace() float64

func (*Deluge) GetTorrents

func (c *Deluge) GetTorrents(ctx context.Context) (map[string]config.Torrent, error)

func (*Deluge) LabelPathMap

func (c *Deluge) LabelPathMap() map[string]string

func (*Deluge) LoadLabelPathMap

func (c *Deluge) LoadLabelPathMap(context.Context) error

func (*Deluge) PauseTorrents

func (c *Deluge) PauseTorrents(ctx context.Context, hashes []string) error

func (*Deluge) RemoveTorrent

func (c *Deluge) RemoveTorrent(ctx context.Context, torrent *config.Torrent, deleteData bool) (bool, error)

func (*Deluge) SetTorrentLabel

func (c *Deluge) SetTorrentLabel(ctx context.Context, hash string, label string, hardlink bool) error

func (*Deluge) SetUploadLimit

func (c *Deluge) SetUploadLimit(ctx context.Context, hash string, limit int64) error

func (*Deluge) ShouldIgnore

func (c *Deluge) ShouldIgnore(ctx context.Context, t *config.Torrent) (bool, string, error)

func (*Deluge) ShouldRelabel

func (c *Deluge) ShouldRelabel(ctx context.Context, t *config.Torrent) (string, bool, error)

func (*Deluge) ShouldRemove

func (c *Deluge) ShouldRemove(ctx context.Context, t *config.Torrent) (bool, error)

func (*Deluge) ShouldRemoveWithReason added in v1.14.0

func (c *Deluge) ShouldRemoveWithReason(ctx context.Context, t *config.Torrent) (bool, string, error)

func (*Deluge) Type

func (c *Deluge) Type() string

type Interface

type Interface interface {
	Type() string
	Connect(ctx context.Context) error
	GetTorrents(ctx context.Context) (map[string]config.Torrent, error)
	RemoveTorrent(ctx context.Context, torrent *config.Torrent, deleteData bool) (bool, error)
	SetTorrentLabel(ctx context.Context, hash string, label string, hardlink bool) error
	GetCurrentFreeSpace(ctx context.Context, path string) (int64, error)
	AddFreeSpace(int64)
	GetFreeSpace() float64
	LoadLabelPathMap(ctx context.Context) error
	LabelPathMap() map[string]string

	SetUploadLimit(ctx context.Context, hash string, limit int64) error

	ShouldIgnore(ctx context.Context, t *config.Torrent) (bool, string, error)
	ShouldRemove(ctx context.Context, t *config.Torrent) (bool, error)
	ShouldRemoveWithReason(ctx context.Context, t *config.Torrent) (bool, string, error)
	CheckTorrentPause(ctx context.Context, t *config.Torrent) (bool, error)
	ShouldRelabel(ctx context.Context, t *config.Torrent) (string, bool, error)

	PauseTorrents(ctx context.Context, hashes []string) error
}

func NewClient

func NewClient(clientType string, clientName string, exp *expression.Expressions) (Interface, error)

func NewDeluge

func NewDeluge(name string, exp *expression.Expressions) (Interface, error)

type QBittorrent

type QBittorrent struct {
	Url                       *string `validate:"required"`
	User                      string
	Password                  string
	EnableAutoTmmAfterRelabel bool
	CreateTagsUpfront         bool `koanf:"create_tags_upfront"`
	// contains filtered or unexported fields
}

func (*QBittorrent) AddFreeSpace

func (c *QBittorrent) AddFreeSpace(bytes int64)

func (*QBittorrent) AddTags

func (c *QBittorrent) AddTags(ctx context.Context, hash string, tags []string) error

func (*QBittorrent) CheckTorrentPause

func (c *QBittorrent) CheckTorrentPause(ctx context.Context, t *config.Torrent) (bool, error)

func (*QBittorrent) Connect

func (c *QBittorrent) Connect(context.Context) error

func (*QBittorrent) CreateTags

func (c *QBittorrent) CreateTags(ctx context.Context, tags []string) error

func (*QBittorrent) DeleteTags

func (c *QBittorrent) DeleteTags(ctx context.Context, tags []string) error

func (*QBittorrent) GetCurrentFreeSpace

func (c *QBittorrent) GetCurrentFreeSpace(ctx context.Context, path string) (int64, error)

func (*QBittorrent) GetFreeSpace

func (c *QBittorrent) GetFreeSpace() float64

func (*QBittorrent) GetTorrents

func (c *QBittorrent) GetTorrents(ctx context.Context) (map[string]config.Torrent, error)

func (*QBittorrent) LabelPathMap

func (c *QBittorrent) LabelPathMap() map[string]string

func (*QBittorrent) LoadLabelPathMap

func (c *QBittorrent) LoadLabelPathMap(ctx context.Context) error

func (*QBittorrent) PauseTorrents

func (c *QBittorrent) PauseTorrents(ctx context.Context, hashes []string) error

func (*QBittorrent) RemoveTags

func (c *QBittorrent) RemoveTags(ctx context.Context, hash string, tags []string) error

func (*QBittorrent) RemoveTorrent

func (c *QBittorrent) RemoveTorrent(ctx context.Context, torrent *config.Torrent, deleteData bool) (bool, error)

func (*QBittorrent) SetTags added in v1.15.0

func (c *QBittorrent) SetTags(ctx context.Context, hash string, tags []string) error

func (*QBittorrent) SetTorrentLabel

func (c *QBittorrent) SetTorrentLabel(ctx context.Context, hash string, label string, hardlink bool) error

func (*QBittorrent) SetUploadLimit

func (c *QBittorrent) SetUploadLimit(ctx context.Context, hash string, limit int64) error

func (*QBittorrent) ShouldIgnore

func (c *QBittorrent) ShouldIgnore(ctx context.Context, t *config.Torrent) (bool, string, error)

func (*QBittorrent) ShouldRelabel

func (c *QBittorrent) ShouldRelabel(ctx context.Context, t *config.Torrent) (string, bool, error)

func (*QBittorrent) ShouldRemove

func (c *QBittorrent) ShouldRemove(ctx context.Context, t *config.Torrent) (bool, error)

func (*QBittorrent) ShouldRemoveWithReason added in v1.14.0

func (c *QBittorrent) ShouldRemoveWithReason(ctx context.Context, t *config.Torrent) (bool, string, error)

func (*QBittorrent) ShouldRetag

func (c *QBittorrent) ShouldRetag(ctx context.Context, t *config.Torrent) (RetagInfo, error)

func (*QBittorrent) Type

func (c *QBittorrent) Type() string

type RetagInfo

type RetagInfo struct {
	Add      map[string]struct{}
	Remove   map[string]struct{}
	UploadKb *int64
}

type TagInterface

type TagInterface interface {
	Interface

	ShouldRetag(ctx context.Context, t *config.Torrent) (RetagInfo, error)
	AddTags(ctx context.Context, hash string, tags []string) error
	RemoveTags(ctx context.Context, hash string, tags []string) error
	SetTags(ctx context.Context, hash string, tags []string) error
	CreateTags(ctx context.Context, tags []string) error
	DeleteTags(ctx context.Context, tags []string) error
}

func NewQBittorrent

func NewQBittorrent(name string, exp *expression.Expressions) (TagInterface, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL