Remove immediate bin
This commit is contained in:
@@ -25,9 +25,7 @@ func (t *TorrentManager) Delete(accessKey string, deleteInRD bool) {
|
||||
if torrent, ok := allTorrents.Get(accessKey); ok {
|
||||
if deleteInRD {
|
||||
torrent.DownloadedIDs.Clone().Each(func(torrentID string) bool {
|
||||
t.log.Debugf("Deleting torrent %s (id=%s) in RD", accessKey, torrentID)
|
||||
t.api.DeleteTorrent(torrentID)
|
||||
t.deleteInfoFile(torrentID)
|
||||
t.DeleteByID(torrentID)
|
||||
return false
|
||||
})
|
||||
}
|
||||
@@ -38,3 +36,8 @@ func (t *TorrentManager) Delete(accessKey string, deleteInRD bool) {
|
||||
})
|
||||
allTorrents.Remove(accessKey)
|
||||
}
|
||||
|
||||
func (t *TorrentManager) DeleteByID(torrentID string) {
|
||||
t.api.DeleteTorrent(torrentID)
|
||||
t.deleteInfoFile(torrentID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user