feat(qbittorrent): delete tags when deleting qbittorrent tasks (#3546)

* feat & refactor(qbittorrent/client): support `deleteFiles` arg for `Client.Delete()` method

* feat(qbittorrent/client): also delete tags in `Client.Delete()`
This commit is contained in:
kdxcxs
2023-02-21 16:45:41 +08:00
committed by GitHub
parent 658cf368bb
commit d1ab2443f1
3 changed files with 30 additions and 13 deletions

View File

@ -88,12 +88,6 @@ func TestAdd(t *testing.T) {
if err != nil {
t.Error(err)
}
// test add
err = c.login()
if err != nil {
t.Error(err)
}
err = c.AddFromLink(
"https://releases.ubuntu.com/22.04/ubuntu-22.04.1-desktop-amd64.iso.torrent",
"D:\\qBittorrentDownload\\alist",
@ -145,7 +139,15 @@ func TestDelete(t *testing.T) {
if err != nil {
t.Error(err)
}
err = c.Delete("uuid-2")
err = c.AddFromLink(
"https://releases.ubuntu.com/22.04/ubuntu-22.04.1-desktop-amd64.iso.torrent",
"D:\\qBittorrentDownload\\alist",
"uuid-1",
)
if err != nil {
t.Error(err)
}
err = c.Delete("uuid-1", true)
if err != nil {
t.Error(err)
}