deluge

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(c *cli.Context, log *zerolog.Logger) (*Client, error)

func (*Client) ForceReannounce

func (m *Client) ForceReannounce(hashes ...string) (e error)

func (*Client) GetScoreFromInput

func (m *Client) GetScoreFromInput(upld, seed, size float64) float64

func (*Client) GetTorrents

func (m *Client) GetTorrents() (map[string]*delugeclient.TorrentStatus, error)

func (*Client) GetTorrentsHashes

func (m *Client) GetTorrentsHashes() (thashes []string, e error)

func (*Client) GetTorrentsStatus

func (m *Client) GetTorrentsStatus() (e error)

func (*Client) GetTorrentsV2

func (m *Client) GetTorrentsV2() (_ []*Torrent, e error)

func (*Client) GetWeakTorrents

func (m *Client) GetWeakTorrents() ([]*delugeclient.TorrentStatus, error)

func (*Client) RemoveTorrent

func (m *Client) RemoveTorrent(hash string, withData bool) (bool, error)

func (*Client) SaveTorrentFile

func (*Client) SaveTorrentFile(fname string, buf io.Reader) (_ int64, e error)

func (*Client) TorrentStatus

func (m *Client) TorrentStatus(hash string) (_ *Torrent, e error)

type Torrent

type Torrent struct {
	Hash          string
	ActiveTime    int64
	Ratio         float32
	IsFinished    bool
	IsSeed        bool
	Name          string
	NumPeers      int64
	NumPieces     int64
	NumSeeds      int64
	PieceLength   int64
	SeedingTime   int64
	State         string
	TotalDone     int64
	TotalPeers    int64
	TotalSeeds    int64
	TotalSize     int64
	TotalUploaded int64
	TrackerStatus string

	Files []*TorrentFile
}

func (*Torrent) GetName

func (m *Torrent) GetName() string

func (*Torrent) GetQuality

func (m *Torrent) GetQuality() string

func (*Torrent) GetShortHash

func (m *Torrent) GetShortHash() string

func (*Torrent) GetTrackerRawError added in v0.0.4

func (m *Torrent) GetTrackerRawError() string

func (*Torrent) GetTrackerStatus

func (m *Torrent) GetTrackerStatus() TrackerStatus

func (*Torrent) GetVKScore

func (m *Torrent) GetVKScore() (_ float64)

type TorrentFile added in v0.0.4

type TorrentFile struct {
	Index  int64
	Size   int64
	Offset int64
	Path   string
}

type TrackerStatus added in v0.0.4

type TrackerStatus uint8
const (
	TrackerStatusOK TrackerStatus = iota
	TrackerStatusUnknown
	TrackerStatusTimedOut
	TrackerStatusConnTimedOut
	TrackerStatusSent
	TrackerStatusNotRegistered
)

Jump to

Keyboard shortcuts

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