Set verified links cache time to 3 mins

This commit is contained in:
Ben Adrian Sarmiento
2024-08-25 13:30:40 +02:00
parent 11e9c5d431
commit 54230c9eaa
4 changed files with 34 additions and 30 deletions

View File

@@ -378,10 +378,10 @@ func (t *TorrentManager) deleteInfoFile(torrentID string) {
func (t *TorrentManager) mountNewDownloads() {
token := t.Config.GetToken()
tokenMap, _ := t.rd.UnrestrictMap.Get(token)
unrestrictCache, _ := t.rd.UnrestrictCache.Get(token)
// clear maps
tokenMap.Clear()
unrestrictCache.Clear()
t.DownloadMap.Clear()
downloads := t.rd.GetDownloads()
@@ -391,7 +391,7 @@ func (t *TorrentManager) mountNewDownloads() {
if strings.HasPrefix(downloads[i].Link, "https://real-debrid.com/d/") {
downloads[i].Link = downloads[i].Link[0:39]
tokenMap.Set(downloads[i].Link, &downloads[i])
unrestrictCache.Set(downloads[i].Link, &downloads[i])
continue
}