autobrr/pkg/porla/domain.go
ze0s ca196f0bf1
feat(releases): support magnet links (#730)
* feat(releases): support magnet links

* feat(feeds): support magnet links

* feat(actions): log messages

* fix: component warning

* fix: check hasprefix instead of hassuffix for magnet

* feat(release): resolve magnet uri from link

* fix(actions): deluge use magnet uri

* fix(macros): add `MagnetURI` var

* fix(actions): run magnet resolving before macros

* feat(feeds): set download type on creation
2023-02-28 22:16:10 +01:00

54 lines
1.5 KiB
Go

package porla
type SysVersions struct {
Porla SysVersionsPorla `json:"porla"`
}
type SysVersionsPorla struct {
Commitish string `json:"commitish"`
Version string `json:"version"`
}
type TorrentsAddReq struct {
DownloadLimit int64 `json:"download_limit,omitempty"`
SavePath string `json:"save_path,omitempty"`
Ti string `json:"ti,omitempty"`
MagnetUri string `json:"magnet_uri,omitempty"`
UploadLimit int64 `json:"upload_limit,omitempty"`
}
type TorrentsAddRes struct {
}
type TorrentsListReq struct {
Filters *TorrentsListFilters `json:"filters"`
}
type TorrentsListFilters struct {
Query string `json:"query"`
}
type TorrentsListRes struct {
Page int `json:"page"`
PageSize int `json:"page_size"`
TorrentsTotal int `json:"torrents_total"`
Torrents []Torrent `json:"torrents"`
}
type Torrent struct {
DownloadRate int `json:"download_rate"`
UploadRate int `json:"upload_rate"`
Flags int `json:"flags"`
InfoHash []string `json:"info_hash"`
ListPeers int `json:"list_peers"`
ListSeeds int `json:"list_seeds"`
Name string `json:"name"`
NumPeers int `json:"num_peers"`
NumSeeds int `json:"num_seeds"`
Progress float64 `json:"progress"`
QueuePosition int `json:"queue_position"`
SavePath string `json:"save_path"`
Size int `json:"size"`
Total int `json:"total"`
TotalDone int `json:"total_done"`
}