mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 19:47:47 +08:00
update
This commit is contained in:
@@ -469,7 +469,6 @@ func (client *Client) Torrents(opts TorrentsOptions) (torrentList []TorrentInfo,
|
||||
return torrentList, nil
|
||||
}
|
||||
|
||||
// deprecated
|
||||
// Torrent returns a specific torrent matching the hash
|
||||
func (client *Client) Torrent(hash string) (torrent Torrent, err error) {
|
||||
var opts = map[string]string{"hash": strings.ToLower(hash)}
|
||||
|
||||
20
pkg/qbittorrent/qbittorrent_test.go
Normal file
20
pkg/qbittorrent/qbittorrent_test.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package qbittorrent
|
||||
|
||||
import (
|
||||
"polaris/log"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test1(t *testing.T) {
|
||||
c, err := NewClient("http://10.0.0.8:8081/", "", "")
|
||||
if err != nil {
|
||||
log.Errorf("new client error: %v", err)
|
||||
t.Fail()
|
||||
}
|
||||
all, err := c.GetAll()
|
||||
for _, t := range all {
|
||||
name, _ := t.Name()
|
||||
log.Infof("torrent: %+v", name)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user