Fix logic on completed bin

This commit is contained in:
Ben Adrian Sarmiento
2024-06-06 12:09:54 +02:00
parent 5a6b6b1546
commit 780ee0f571

View File

@@ -159,6 +159,8 @@ func (t *TorrentManager) binOnceDone(completedTorrentId string, errorCheck bool)
if !t.OnceDoneBin.Contains(specialCase) {
return false
}
t.deleteInfoFile(completedTorrentId)
t.OnceDoneBin.Remove(specialCase)
t.OnceDoneBin.Clone().Each(func(entry string) bool {
if strings.Contains(entry, specialCase) {
if errorCheck {
@@ -178,8 +180,6 @@ func (t *TorrentManager) binOnceDone(completedTorrentId string, errorCheck bool)
}
return false
})
t.deleteInfoFile(completedTorrentId)
t.OnceDoneBin.Remove(specialCase)
t.persistBins()
return true
}