Rename variables for easy reference
This commit is contained in:
@@ -105,12 +105,12 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, w
|
||||
defer wg.Done()
|
||||
|
||||
// initial load of existing *.zurgtorrent files
|
||||
allTorrents, _ := t.DirectoryMap.Get(INT_ALL)
|
||||
torrents, _ := t.DirectoryMap.Get(INT_ALL)
|
||||
t.getTorrentFiles("data").Each(func(filePath string) bool {
|
||||
torrent := t.readTorrentFromFile(filePath)
|
||||
if torrent != nil {
|
||||
accessKey := t.GetKey(torrent)
|
||||
allTorrents.Set(accessKey, torrent)
|
||||
torrents.Set(accessKey, torrent)
|
||||
t.assignDirectory(torrent, false, false)
|
||||
}
|
||||
return false
|
||||
@@ -498,12 +498,12 @@ func (t *TorrentManager) StartDumpJob() {
|
||||
}
|
||||
|
||||
func (t *TorrentManager) analyzeAllTorrents() {
|
||||
allTorrents, _ := t.DirectoryMap.Get(INT_ALL)
|
||||
totalCount := allTorrents.Count()
|
||||
torrents, _ := t.DirectoryMap.Get(INT_ALL)
|
||||
totalCount := torrents.Count()
|
||||
t.log.Infof("Applying media info details to all %d torrents", totalCount)
|
||||
idx := 0
|
||||
skipTheRest := false
|
||||
allTorrents.IterCb(func(_ string, torrent *Torrent) {
|
||||
torrents.IterCb(func(_ string, torrent *Torrent) {
|
||||
if skipTheRest {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user