fix multi-api key bug
This commit is contained in:
@@ -8,7 +8,7 @@ type Client interface {
|
||||
SubmitMagnet(tr *Torrent) (*Torrent, error)
|
||||
CheckStatus(tr *Torrent, isSymlink bool) (*Torrent, error)
|
||||
GenerateDownloadLinks(tr *Torrent) error
|
||||
GetDownloadLink(tr *Torrent, file *File) (string, error)
|
||||
GetDownloadLink(tr *Torrent, file *File) (string, string, error)
|
||||
DeleteTorrent(torrentId string) error
|
||||
IsAvailable(infohashes []string) map[string]bool
|
||||
GetCheckCached() bool
|
||||
@@ -21,6 +21,6 @@ type Client interface {
|
||||
GetDownloads() (map[string]DownloadLinks, error)
|
||||
CheckLink(link string) error
|
||||
GetMountPath() string
|
||||
RemoveActiveDownloadKey()
|
||||
DisableAccount(string)
|
||||
ResetActiveDownloadKeys()
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ type File struct {
|
||||
Path string `json:"path"`
|
||||
Link string `json:"link"`
|
||||
DownloadLink string `json:"download_link"`
|
||||
AccountId string `json:"account_id"`
|
||||
Generated time.Time `json:"generated"`
|
||||
}
|
||||
|
||||
@@ -118,3 +119,10 @@ func (t *Torrent) GetFile(id string) *File {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Account struct {
|
||||
ID string `json:"id"`
|
||||
Disabled bool `json:"disabled"`
|
||||
Name string `json:"name"`
|
||||
Token string `json:"token"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user