Trigger repair on initial run
This commit is contained in:
@@ -68,6 +68,7 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, w
|
|||||||
t.setNewLatestState(t.getCurrentState())
|
t.setNewLatestState(t.getCurrentState())
|
||||||
t.StartRefreshJob()
|
t.StartRefreshJob()
|
||||||
t.StartRepairJob()
|
t.StartRepairJob()
|
||||||
|
t.TriggerRepair(nil)
|
||||||
})
|
})
|
||||||
t.workerPool.Submit(func() {
|
t.workerPool.Submit(func() {
|
||||||
t.mountDownloads()
|
t.mountDownloads()
|
||||||
|
|||||||
@@ -141,9 +141,11 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *Torrent {
|
|||||||
if torrentFromCache, exists := infoCache.Get(rdTorrent.ID); exists &&
|
if torrentFromCache, exists := infoCache.Get(rdTorrent.ID); exists &&
|
||||||
!torrentFromCache.AnyInProgress() &&
|
!torrentFromCache.AnyInProgress() &&
|
||||||
torrentFromCache.SelectedFiles.Count() == len(rdTorrent.Links) {
|
torrentFromCache.SelectedFiles.Count() == len(rdTorrent.Links) {
|
||||||
|
|
||||||
return torrentFromCache
|
return torrentFromCache
|
||||||
|
|
||||||
} else if !exists {
|
} else if !exists {
|
||||||
|
|
||||||
torrentFromFile := t.readTorrentFromFile(rdTorrent.ID)
|
torrentFromFile := t.readTorrentFromFile(rdTorrent.ID)
|
||||||
|
|
||||||
if torrentFromFile != nil &&
|
if torrentFromFile != nil &&
|
||||||
|
|||||||
Reference in New Issue
Block a user