diff --git a/README.md b/README.md index fc5006e..3d575cc 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,12 @@ Polaris 是一个电视剧和电影的追踪软件。配置好了之后,当剧 - [x] plex 刮削支持 - [x] NFO 刮削文件支持 - [x] BT/PT 支持 +- [x] qbittorrent/transmission客户端支持 - [x] and more... ## Todos -- [ ] qbittorrent客户端支持 + - [ ] 更多通知客户端支持 - [ ] 第三方watchlist导入支持 - [ ] 手机客户端 diff --git a/pkg/go-qbittorrent/qbt/api.go b/pkg/go-qbittorrent/qbt/api.go index 884633a..a44ecc3 100644 --- a/pkg/go-qbittorrent/qbt/api.go +++ b/pkg/go-qbittorrent/qbt/api.go @@ -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)} diff --git a/pkg/qbittorrent/qbittorrent_test.go b/pkg/qbittorrent/qbittorrent_test.go new file mode 100644 index 0000000..2cce6d5 --- /dev/null +++ b/pkg/qbittorrent/qbittorrent_test.go @@ -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) + } + +}