A more comprehensive delete process
This commit is contained in:
@@ -77,11 +77,12 @@ func (t *TorrentManager) RefreshTorrents() []string {
|
|||||||
// ensure delete
|
// ensure delete
|
||||||
infoCache, _ := t.DirectoryMap.Get(INT_INFO_CACHE)
|
infoCache, _ := t.DirectoryMap.Get(INT_INFO_CACHE)
|
||||||
t.ensureDelete.Each(func(fixerID string) bool {
|
t.ensureDelete.Each(func(fixerID string) bool {
|
||||||
if torrent, exists := infoCache.Get(fixerID); exists && torrent.AnyInProgress() {
|
torrent, exists := infoCache.Get(fixerID)
|
||||||
|
if exists && torrent.AnyInProgress() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
t.log.Debugf("Ensuring that torrent id=%s is deleted", fixerID)
|
t.log.Debugf("Ensuring that torrent id=%s is deleted", fixerID)
|
||||||
t.Api.DeleteTorrent(fixerID)
|
t.Delete(t.GetKey(torrent), true)
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user