diff --git a/addon/moch/moch.js b/addon/moch/moch.js index e3af154..f2f226c 100644 --- a/addon/moch/moch.js +++ b/addon/moch/moch.js @@ -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 }) } diff --git a/addon/serverless.js b/addon/serverless.js index 5b4ed8e..89e68fe 100644 --- a/addon/serverless.js +++ b/addon/serverless.js @@ -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,