Remove ristretto cache

This commit is contained in:
Ben Sarmiento
2023-12-06 01:11:58 +01:00
parent 121a28d46f
commit 4b8fd82acd
7 changed files with 63 additions and 226 deletions

View File

@@ -14,7 +14,7 @@ func HandleDeleteTorrent(directory, torrentName string, t *torrent.TorrentManage
if !torrents.Has(torrentName) {
return fmt.Errorf("cannot find torrent %s", torrentName)
}
t.Delete(torrentName, true, true)
t.Delete(torrentName, true)
return nil
}
@@ -33,10 +33,9 @@ func HandleDeleteFile(directory, torrentName, fileName string, t *torrent.Torren
}
file.Link = "unselect"
if t.CheckDeletedState(torrent) {
t.Delete(torrentName, true, true)
} else {
updatedPaths := t.UpdateTorrentResponseCache(torrent)
t.TriggerHookOnLibraryUpdate(updatedPaths)
t.Delete(torrentName, true)
}
// todo: triggeer an update ???
// t.TriggerHookOnLibraryUpdate(updatedPaths)
return nil
}