fix: name cannot parsed

This commit is contained in:
Simon Ding
2024-07-24 18:35:01 +08:00
parent f4b8d03cfc
commit 16ca00d19c
6 changed files with 22 additions and 19 deletions

View File

@@ -38,9 +38,9 @@ type Client struct {
cfg Config
}
func (c *Client) Download(magnet, dir string) (*Torrent, error) {
func (c *Client) Download(link, dir string) (*Torrent, error) {
t, err := c.c.TorrentAdd(context.TODO(), transmissionrpc.TorrentAddPayload{
Filename: &magnet,
Filename: &link,
DownloadDir: &dir,
})
log.Infof("get torrent info: %+v", t)