Refactors 2
This commit is contained in:
@@ -64,17 +64,6 @@ func (t *TorrentManager) willDeleteOnceDone(torrentId string) {
|
||||
t.persistBins()
|
||||
}
|
||||
|
||||
func (t *TorrentManager) cleanupBins(freshIDs mapset.Set[string]) {
|
||||
t.OnceDoneBin.Clone().Each(func(entry string) bool {
|
||||
// check for: delete once done cases
|
||||
if !freshIDs.ContainsOne(entry) {
|
||||
t.OnceDoneBin.Remove(entry)
|
||||
}
|
||||
return false
|
||||
})
|
||||
t.persistBins()
|
||||
}
|
||||
|
||||
// deleteOnceDone checks if the torrent is in the OnceDoneBin and deletes it if it is.
|
||||
// returns true if the torrent was in the bin and was deleted, false otherwise
|
||||
func (t *TorrentManager) deleteOnceDone(completedTorrentId string, failed bool) {
|
||||
|
||||
Reference in New Issue
Block a user