Save when its complete
This commit is contained in:
@@ -220,16 +220,13 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *Torrent {
|
||||
}
|
||||
torrent.DownloadedIDs = mapset.NewSet[string]()
|
||||
torrent.InProgressIDs = mapset.NewSet[string]()
|
||||
if info.Progress == 100 {
|
||||
if rdTorrent.Progress == 100 {
|
||||
torrent.DownloadedIDs.Add(info.ID)
|
||||
} else {
|
||||
torrent.InProgressIDs.Add(info.ID)
|
||||
}
|
||||
|
||||
// save to cache if it's not in progress anymore
|
||||
if info.Progress == 100 {
|
||||
// save to cache if it's not in progress anymore
|
||||
infoCache.Set(rdTorrent.ID, &torrent)
|
||||
t.saveTorrentChangesToDisk(&torrent, nil)
|
||||
} else {
|
||||
torrent.InProgressIDs.Add(info.ID)
|
||||
}
|
||||
|
||||
return &torrent
|
||||
|
||||
Reference in New Issue
Block a user