Repair rework for rar files
This commit is contained in:
@@ -149,7 +149,6 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *Torrent {
|
||||
}
|
||||
selectedFiles = append(selectedFiles, &File{
|
||||
File: file,
|
||||
Added: info.Added,
|
||||
Ended: info.Ended,
|
||||
Link: "", // no link yet
|
||||
})
|
||||
@@ -159,6 +158,9 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *Torrent {
|
||||
for i, file := range selectedFiles {
|
||||
file.Link = info.Links[i]
|
||||
}
|
||||
torrent.UnassignedLinks = mapset.NewSet[string]()
|
||||
} else {
|
||||
torrent.UnassignedLinks = mapset.NewSet[string](info.Links...)
|
||||
}
|
||||
torrent.SelectedFiles = cmap.New[*File]()
|
||||
for _, file := range selectedFiles {
|
||||
@@ -195,6 +197,7 @@ func (t *TorrentManager) mergeToMain(existing, toMerge *Torrent) Torrent {
|
||||
mainTorrent.DownloadedIDs = mapset.NewSet[string]()
|
||||
mainTorrent.InProgressIDs = mapset.NewSet[string]()
|
||||
mainTorrent.Unfixable = existing.Unfixable || toMerge.Unfixable
|
||||
mainTorrent.UnassignedLinks = existing.UnassignedLinks.Union(toMerge.UnassignedLinks)
|
||||
|
||||
// this function triggers only when we have a new DownloadedID
|
||||
toMerge.DownloadedIDs.Difference(existing.DownloadedIDs).Each(func(id string) bool {
|
||||
|
||||
Reference in New Issue
Block a user