Remove unnecessary configs
This commit is contained in:
@@ -155,23 +155,23 @@ func (t *TorrentManager) RefreshTorrents() {
|
||||
}
|
||||
t.log.Infof("Compiled into %d torrents, %d were missing info", oldTorrents.Count(), noInfoCount)
|
||||
|
||||
somthingChanged := false
|
||||
somethingChanged := false
|
||||
// removed
|
||||
strset.Difference(t.accessKeySet, freshKeys).Each(func(accessKey string) bool {
|
||||
somthingChanged = true
|
||||
somethingChanged = true
|
||||
t.Delete(accessKey, false, false)
|
||||
return true
|
||||
})
|
||||
// new
|
||||
strset.Difference(freshKeys, t.accessKeySet).Each(func(accessKey string) bool {
|
||||
somthingChanged = true
|
||||
somethingChanged = true
|
||||
torrent, _ := oldTorrents.Get(accessKey)
|
||||
t.UpdateTorrentResponseCache(torrent)
|
||||
t.accessKeySet.Add(accessKey)
|
||||
return true
|
||||
})
|
||||
// now we can build the directory responses
|
||||
if somthingChanged {
|
||||
if somethingChanged {
|
||||
t.UpdateDirectoryResponsesCache()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user