Rework basic auth

This commit is contained in:
Ben Sarmiento
2024-01-10 23:42:14 +01:00
parent 124de7c01c
commit 0ea5d55b8a
5 changed files with 42 additions and 16 deletions

View File

@@ -35,13 +35,10 @@ func (t *TorrentManager) repairAll() {
if torrent.AnyInProgress() || torrent.Unfixable {
return
}
// Check if the current group is full
if currentGroup.Cardinality() >= maxGroupSize {
// Create a new group and add it to the hashGroups
currentGroup = mapset.NewSet[string]()
hashGroups = append(hashGroups, currentGroup)
}
// Add the hash to the current group
currentGroup.Add(torrent.Hash)
})