Identify broken links properly
This commit is contained in:
@@ -16,16 +16,12 @@ func (t *TorrentManager) CheckDeletedStatus(torrent *Torrent) bool {
|
||||
torrent.DownloadedIDs.Each(func(id string) bool {
|
||||
info, _ := infoCache.Get(id)
|
||||
info.SelectedFiles.IterCb(func(_ string, file *File) {
|
||||
found := false
|
||||
for _, unselectedID := range unselectedIDs {
|
||||
if file.ID == unselectedID {
|
||||
found = true
|
||||
file.Link = "unselect"
|
||||
break
|
||||
}
|
||||
}
|
||||
if found {
|
||||
file.Link = "unselect"
|
||||
}
|
||||
})
|
||||
t.writeTorrentToFile(id, info, false)
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user