Ignore errors when marking torrent as repaired (also mute warnings when under repair)
This commit is contained in:
@@ -262,9 +262,7 @@ func (t *TorrentManager) convertToTorrent(info *realdebrid.TorrentInfo) *Torrent
|
||||
}
|
||||
}
|
||||
torrent.UnassignedLinks = mapset.NewSet[string]()
|
||||
if err := torrent.State.Event(context.Background(), "mark_as_repaired"); err != nil {
|
||||
t.log.Errorf("Cannot repair torrent %s: %v", torrent.Hash, err)
|
||||
}
|
||||
torrent.State.Event(context.Background(), "mark_as_repaired")
|
||||
} else {
|
||||
torrent.UnassignedLinks = mapset.NewSet[string]()
|
||||
for _, link := range info.Links {
|
||||
@@ -361,9 +359,7 @@ func (t *TorrentManager) mergeTorrents(existing, toMerge *Torrent) *Torrent {
|
||||
})
|
||||
|
||||
if brokenCount == 0 && okCount > 0 {
|
||||
if err := mergedTorrent.State.Event(context.Background(), "mark_as_repaired"); err != nil {
|
||||
t.log.Errorf("Cannot repair torrent %s: %v", t, t.GetKey(mergedTorrent), err)
|
||||
}
|
||||
mergedTorrent.State.Event(context.Background(), "mark_as_repaired")
|
||||
}
|
||||
|
||||
return mergedTorrent
|
||||
|
||||
Reference in New Issue
Block a user