Fixer refactor

This commit is contained in:
Ben Sarmiento
2024-01-19 03:31:30 +01:00
parent 7b1e34c705
commit 6c7c57ebfa
2 changed files with 20 additions and 7 deletions

View File

@@ -31,6 +31,7 @@ func (t *TorrentManager) RefreshTorrents() []string {
if instances[idx].IsDone() && t.fixers.Has(instances[idx].ID) {
fixer := instances[idx]
torrent, _ := t.fixers.Pop(fixer.ID)
t.log.Debugf("Fixer %s is done, let's check if it fixed torrent %s", instances[idx].ID, t.GetKey(torrent))
brokenFiles := getBrokenFiles(torrent)
info, err := t.redownloadTorrent(torrent, "")
if err == nil {