saveTorrentChangesToDisk when relevant
This commit is contained in:
@@ -234,7 +234,7 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *Torrent {
|
||||
torrent.BrokenLinks = mapset.NewSet[string]()
|
||||
|
||||
infoCache.Set(rdTorrent.ID, &torrent)
|
||||
t.writeTorrentToFile(rdTorrent.ID, &torrent)
|
||||
t.saveTorrentChangesToDisk(&torrent, nil)
|
||||
|
||||
return &torrent
|
||||
}
|
||||
@@ -290,18 +290,6 @@ func (t *TorrentManager) mergeToMain(existing, toMerge *Torrent) Torrent {
|
||||
}
|
||||
})
|
||||
|
||||
// broken links
|
||||
if mainTorrent.BrokenLinks.Cardinality() > 0 {
|
||||
mainTorrent.SelectedFiles.IterCb(func(_ string, file *File) {
|
||||
mainTorrent.BrokenLinks.Each(func(brokenLink string) bool {
|
||||
if file.Link == brokenLink {
|
||||
file.Link = ""
|
||||
}
|
||||
return file.Link == brokenLink
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
if existing.Added < toMerge.Added {
|
||||
mainTorrent.Added = toMerge.Added
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user