Refactor torrent fetching
This commit is contained in:
@@ -262,7 +262,7 @@ func (t *TorrentManager) repair(torrent *Torrent) {
|
||||
}
|
||||
|
||||
func (t *TorrentManager) assignUnassignedLinks(torrent *Torrent) bool {
|
||||
t.log.Infof("Trying to assign links to incomplete torrent %s", t.GetKey(torrent))
|
||||
t.log.Infof("Trying to assign %d links to incomplete torrent %s", torrent.UnassignedLinks.Cardinality(), t.GetKey(torrent))
|
||||
// handle torrents with incomplete links for selected files
|
||||
assignedCount := 0
|
||||
rarCount := 0
|
||||
@@ -272,8 +272,7 @@ func (t *TorrentManager) assignUnassignedLinks(torrent *Torrent) bool {
|
||||
unrestrict := t.UnrestrictLinkUntilOk(link)
|
||||
if unrestrict == nil {
|
||||
newUnassignedLinks.Set(link, nil)
|
||||
// return early, no point continuing
|
||||
return false
|
||||
return false // next
|
||||
}
|
||||
|
||||
// try to assign to a selected file
|
||||
|
||||
Reference in New Issue
Block a user