mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-05-14 19:30:46 +00:00
update resolve endpoint path
This commit is contained in:
parent
033438f413
commit
8ae31eaca4
2 changed files with 8 additions and 3 deletions
|
|
@ -188,7 +188,7 @@ function populateCachedLinks(streams, mochResult, config) {
|
||||||
return {
|
return {
|
||||||
name: `[${mochResult.moch.shortName}+] ${stream.name}`,
|
name: `[${mochResult.moch.shortName}+] ${stream.name}`,
|
||||||
title: stream.title,
|
title: stream.title,
|
||||||
url: `${config.host}/${mochResult.moch.key}/${cachedEntry.url}/${streamFilename(stream)}`,
|
url: `${config.host}/resolve/${mochResult.moch.key}/${cachedEntry.url}/${streamFilename(stream)}`,
|
||||||
behaviorHints: stream.behaviorHints
|
behaviorHints: stream.behaviorHints
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -208,7 +208,7 @@ function populateDownloadLinks(streams, results, config) {
|
||||||
streams.push({
|
streams.push({
|
||||||
name: `[${mochResult.moch.shortName} download] ${stream.name}`,
|
name: `[${mochResult.moch.shortName} download] ${stream.name}`,
|
||||||
title: stream.title,
|
title: stream.title,
|
||||||
url: `${config.host}/${mochResult.moch.key}/${cachedEntry.url}/${streamFilename(stream)}`,
|
url: `${config.host}/resolve/${mochResult.moch.key}/${cachedEntry.url}/${streamFilename(stream)}`,
|
||||||
behaviorHints: stream.behaviorHints
|
behaviorHints: stream.behaviorHints
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,12 @@ router.get('/:configuration?/:resource/:type/:id/:extra?.json', limiter, (req, r
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
router.get('/:moch/:apiKey/:infoHash/:cachedEntryInfo/:fileIndex/:filename?', (req, res) => {
|
router.get(
|
||||||
|
[
|
||||||
|
'/:moch/:apiKey/:infoHash/:cachedEntryInfo/:fileIndex/:filename?',
|
||||||
|
'/resolve/:moch/:apiKey/:infoHash/:cachedEntryInfo/:fileIndex/:filename?'
|
||||||
|
],
|
||||||
|
(req, res) => {
|
||||||
const userAgent = req.headers['user-agent'] || '';
|
const userAgent = req.headers['user-agent'] || '';
|
||||||
const parameters = {
|
const parameters = {
|
||||||
mochKey: req.params.moch,
|
mochKey: req.params.moch,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue