Fix directory listing

This commit is contained in:
Ben Sarmiento
2023-12-07 13:19:59 +01:00
parent 42dce61529
commit d84f042345

View File

@@ -43,7 +43,6 @@ func (t *TorrentManager) RefreshTorrents() []string {
}
freshKeys.Add(info.AccessKey)
if torrent, exists := allTorrents.Get(info.AccessKey); !exists {
t.allAccessKeys.Add(info.AccessKey)
allTorrents.Set(info.AccessKey, info)
} else if !strset.Difference(info.DownloadedIDs, torrent.DownloadedIDs).IsEmpty() {
mainTorrent := t.mergeToMain(torrent, info)
@@ -64,6 +63,7 @@ func (t *TorrentManager) RefreshTorrents() []string {
torrents.Set(accessKey, tor)
updatedPaths = append(updatedPaths, fmt.Sprintf("%s/%s", directory, accessKey))
})
t.allAccessKeys.Add(accessKey)
return true
})
// removed torrents