diff --git a/internal/torrent/manager.go b/internal/torrent/manager.go index 6c2b6b1..4220189 100644 --- a/internal/torrent/manager.go +++ b/internal/torrent/manager.go @@ -68,6 +68,7 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, w t.setNewLatestState(t.getCurrentState()) t.StartRefreshJob() t.StartRepairJob() + t.TriggerRepair(nil) }) t.workerPool.Submit(func() { t.mountDownloads() diff --git a/internal/torrent/refresh.go b/internal/torrent/refresh.go index 7dbf584..f2ff66e 100644 --- a/internal/torrent/refresh.go +++ b/internal/torrent/refresh.go @@ -141,9 +141,11 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *Torrent { if torrentFromCache, exists := infoCache.Get(rdTorrent.ID); exists && !torrentFromCache.AnyInProgress() && torrentFromCache.SelectedFiles.Count() == len(rdTorrent.Links) { + return torrentFromCache } else if !exists { + torrentFromFile := t.readTorrentFromFile(rdTorrent.ID) if torrentFromFile != nil &&