feat(qbittorrent): Add more methods (#443)

* (feat): qbittorrent: Add funcs

* sync

* Delete go.mod

* more more more

* a cat for your trouble

* no pointers for you

* maybe they weren't so bad afterall.
This commit is contained in:
Kyle Sanderson 2022-08-29 06:30:31 -07:00 committed by GitHub
parent 9813f5718d
commit 5a7614f954
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 230 additions and 2 deletions

View file

@ -59,11 +59,27 @@ type TorrentTracker struct {
Status TrackerStatus `json:"status"`
NumPeers int `json:"num_peers"`
NumSeeds int `json:"num_seeds"`
NumLeechers int `json:"num_leeches"`
NumLeechers int `json:"num_leechers"`
NumDownloaded int `json:"num_downloaded"`
Message string `json:"msg"`
}
type TorrentFiles []struct {
Availability int `json:"availability"`
Index int `json:"index"`
IsSeed bool `json:"is_seed,omitempty"`
Name string `json:"name"`
PieceRange []int `json:"piece_range"`
Priority int `json:"priority"`
Progress int `json:"progress"`
Size int `json:"size"`
}
type Category struct {
Name string `json:"name"`
SavePath string `json:"savePath"`
}
type TorrentState string
const (
@ -113,7 +129,7 @@ const (
TorrentStateCheckingDl TorrentState = "checkingDL"
// Torrent is forced to downloading to ignore queue limit
TorrentStateForceDl TorrentState = "forceDL"
TorrentStateForcedDl TorrentState = "forcedDL"
// Checking resume data on qBt startup
TorrentStateCheckingResumeData TorrentState = "checkingResumeData"