[scraper] cache rd options per ip

This commit is contained in:
TheBeastLT
2020-04-03 13:27:26 +02:00
parent d2eb8d04c0
commit 33d9921179
4 changed files with 25 additions and 11 deletions

View File

@@ -50,7 +50,7 @@ server.get('/', function (req, res) {
server.get('/realdebrid/:apiKey/:infoHash/:cachedFileIds/:fileIndex?', (req, res) => {
const { apiKey, infoHash, cachedFileIds, fileIndex } = req.params;
realDebrid.resolve(apiKey, infoHash, cachedFileIds, isNaN(fileIndex) ? undefined : parseInt(fileIndex))
realDebrid.resolve(req.ip, apiKey, infoHash, cachedFileIds, isNaN(fileIndex) ? undefined : parseInt(fileIndex))
.then(url => {
res.writeHead(301, { Location: url });
res.end();