Repair adjustments

This commit is contained in:
Ben Sarmiento
2024-04-30 03:41:20 +02:00
parent 102512f7d3
commit a3bc9e75f5
2 changed files with 28 additions and 33 deletions

View File

@@ -143,8 +143,7 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *Torrent {
return cachedTor
} else if diskTor := t.readTorrentFromFile(rdTorrent.ID); diskTor != nil &&
diskTor.SelectedFiles.Count() == len(rdTorrent.Links) {
} else if diskTor := t.readTorrentFromFile(rdTorrent.ID); diskTor != nil && !diskTor.AllInProgress() {
infoCache.Set(rdTorrent.ID, diskTor)
t.ResetSelectedFiles(diskTor)
@@ -217,7 +216,7 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *Torrent {
return &torrent
}
// ResetSelectedFiles will rename the file based on config
// ResetSelectedFiles resets the selected files for a torrent
func (t *TorrentManager) ResetSelectedFiles(torrent *Torrent) {
// reset selected files
newSelectedFiles := cmap.New[*File]()