Set filenames properly

This commit is contained in:
Ben Sarmiento
2024-01-28 03:48:53 +01:00
parent 3d9ad6a791
commit 00e4f8013c
3 changed files with 9 additions and 7 deletions

View File

@@ -147,7 +147,6 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *Torrent {
if torrentFromCache, exists := infoCache.Get(rdTorrent.ID); exists &&
!torrentFromCache.AnyInProgress() &&
torrentFromCache.SelectedFiles.Count() == len(rdTorrent.Links) {
t.ResetSelectedFiles(torrentFromCache)
return torrentFromCache
}
@@ -165,6 +164,7 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *Torrent {
if !hasBrokenFiles {
infoCache.Set(rdTorrent.ID, torrentFromFile)
t.ResetSelectedFiles(torrentFromFile)
return torrentFromFile
} else {
t.log.Warnf("Torrent %s has broken files, will not save on info cache", rdTorrent.ID)