Repair rework for rar files

This commit is contained in:
Ben Sarmiento
2024-01-07 14:24:21 +01:00
parent e5f0f4d7bd
commit 72f7b0f1e5
5 changed files with 97 additions and 73 deletions

View File

@@ -44,7 +44,7 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, p
Api: api,
allAccessKeys: mapset.NewSet[string](),
latestState: &initialSate,
requiredVersion: "06.12.2023",
requiredVersion: "07.01.2024",
workerPool: p,
log: log,
}
@@ -109,7 +109,14 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, p
// proxy
func (t *TorrentManager) UnrestrictUntilOk(link string) *realdebrid.Download {
return t.Api.UnrestrictUntilOk(link, t.Config.ShouldServeFromRclone())
if download, exists := t.DownloadCache.Get(link); exists {
return download
}
ret := t.Api.UnrestrictUntilOk(link, t.Config.ShouldServeFromRclone())
if ret != nil {
t.DownloadCache.Set(link, ret)
}
return ret
}
func (t *TorrentManager) TriggerHookOnLibraryUpdate(updatedPaths []string) {