mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-01-11 22:40:22 +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 {
|
||||
name: `[${mochResult.moch.shortName}+] ${stream.name}`,
|
||||
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
|
||||
};
|
||||
}
|
||||
|
|
@ -208,7 +208,7 @@ function populateDownloadLinks(streams, results, config) {
|
|||
streams.push({
|
||||
name: `[${mochResult.moch.shortName} download] ${stream.name}`,
|
||||
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
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 parameters = {
|
||||
mochKey: req.params.moch,
|
||||
|
|
|
|||
Loading…
Reference in a new issue