Also delete from API

This commit is contained in:
Ben Sarmiento
2024-01-18 23:39:38 +01:00
parent 6a15f233af
commit 4b08a8efdf

View File

@@ -33,6 +33,7 @@ func (t *TorrentManager) RefreshTorrents() []string {
brokenFiles := getBrokenFiles(torrent) brokenFiles := getBrokenFiles(torrent)
info, err := t.redownloadTorrent(torrent, "") info, err := t.redownloadTorrent(torrent, "")
if err == nil && info.Progress == 100 && !t.isStillBroken(info, brokenFiles) { if err == nil && info.Progress == 100 && !t.isStillBroken(info, brokenFiles) {
t.Api.DeleteTorrent(instances[idx].ID)
t.onlyForRepair.Remove(instances[idx].ID) t.onlyForRepair.Remove(instances[idx].ID)
} }
infoChan <- nil infoChan <- nil