Repair logs

This commit is contained in:
Ben Sarmiento
2023-12-10 18:45:26 +01:00
parent 788e19de8f
commit fef347425e
3 changed files with 12 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ func (t *TorrentManager) RefreshTorrents() []string {
noInfoCount++
continue
}
if !info.AnyInProgress() {
if !info.AllInProgress() {
freshKeys.Add(info.AccessKey)
}
if torrent, exists := allTorrents.Get(info.AccessKey); !exists {
@@ -76,6 +76,7 @@ func (t *TorrentManager) RefreshTorrents() []string {
return true
})
// removed torrents
// items which are in in t.allAccessKeys but not in freshKeys
strset.Difference(t.allAccessKeys, freshKeys).Each(func(accessKey string) bool {
t.Delete(accessKey, false)
return true