Rename variables for easy reference

This commit is contained in:
Ben Adrian Sarmiento
2024-07-21 02:11:32 +02:00
parent 47751320f7
commit f8b9f8955b
8 changed files with 46 additions and 33 deletions

View File

@@ -8,7 +8,7 @@ import (
func (t *TorrentManager) GetUncachedTorrents() ([]*Torrent, error) {
t.log.Debug("Checking if torrents are still cached")
allTorrents, _ := t.DirectoryMap.Get(INT_ALL)
torrents, _ := t.DirectoryMap.Get(INT_ALL)
var hashGroups []mapset.Set[string]
const maxGroupSize = 399
@@ -16,7 +16,7 @@ func (t *TorrentManager) GetUncachedTorrents() ([]*Torrent, error) {
currentGroup := mapset.NewSet[string]()
hashGroups = append(hashGroups, currentGroup)
allTorrents.IterCb(func(_ string, torrent *Torrent) {
torrents.IterCb(func(_ string, torrent *Torrent) {
if torrent.UnrepairableReason != "" {
return
}
@@ -45,7 +45,7 @@ func (t *TorrentManager) GetUncachedTorrents() ([]*Torrent, error) {
}
var uncachedTorrents []*Torrent
allTorrents.IterCb(func(_ string, torrent *Torrent) {
torrents.IterCb(func(_ string, torrent *Torrent) {
if torrent.UnrepairableReason != "" {
return
}