mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[addon] add named queue to run single unrestrict
This commit is contained in:
@@ -71,10 +71,10 @@ router.get('/:configuration/:resource/:type/:id.json', (req, res, next) => {
|
||||
|
||||
router.get('/realdebrid/:apiKey/:infoHash/:cachedFileIds/:fileIndex?', (req, res) => {
|
||||
const { apiKey, infoHash, cachedFileIds, fileIndex } = req.params;
|
||||
console.time(infoHash);
|
||||
console.log(`Unrestricting ${infoHash} [${fileIndex}]`);
|
||||
realDebrid.unrestrict(apiKey, infoHash, cachedFileIds, isNaN(fileIndex) ? undefined : parseInt(fileIndex))
|
||||
.then(url => {
|
||||
console.timeEnd(infoHash);
|
||||
console.log(`Unrestricted ${infoHash} [${fileIndex}] to ${url}`);
|
||||
res.writeHead(301, { Location: url });
|
||||
res.end();
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user