Dont reanalyze broken files

This commit is contained in:
Ben Sarmiento
2024-05-25 22:14:26 +02:00
parent 8e7f7c7624
commit 66dd32a37d

View File

@@ -198,12 +198,12 @@ func (t *TorrentManager) writeTorrentToFile(torrent *Torrent) {
return return
} }
t.log.Debugf("Saved torrent %s to file", t.GetKey(torrent), torrent.Hash) t.log.Debugf("Saved torrent %s to file", t.GetKey(torrent))
} }
func (t *TorrentManager) applyMediaInfoDetails(torrent *Torrent) { func (t *TorrentManager) applyMediaInfoDetails(torrent *Torrent) {
torrent.SelectedFiles.IterCb(func(_ string, file *File) { torrent.SelectedFiles.IterCb(func(_ string, file *File) {
if file.MediaInfo != nil { if file.MediaInfo != nil || file.State.Is("broken_file") {
return return
} }
unrestrict := t.UnrestrictFileUntilOk(file, false) unrestrict := t.UnrestrictFileUntilOk(file, false)