[addon] return 302 instead of 301 for resolved links

This commit is contained in:
TheBeastLT
2020-04-22 10:22:55 +02:00
parent 3299bc2d06
commit e349a48c1a
3 changed files with 5 additions and 5 deletions

View File

@@ -1599,8 +1599,8 @@
} }
}, },
"parse-torrent-title": { "parse-torrent-title": {
"version": "git://github.com/TheBeastLT/parse-torrent-title.git#86dc66fc3b05d798f400d3a457720890dced4901", "version": "git://github.com/TheBeastLT/parse-torrent-title.git#9e751ef6e0b4adb31d306d618c92f9feb84963bb",
"from": "git://github.com/TheBeastLT/parse-torrent-title.git#86dc66fc3b05d798f400d3a457720890dced4901", "from": "git://github.com/TheBeastLT/parse-torrent-title.git#9e751ef6e0b4adb31d306d618c92f9feb84963bb",
"requires": { "requires": {
"moment": "^2.24.0" "moment": "^2.24.0"
} }

View File

@@ -14,10 +14,10 @@
"named-queue": "^2.2.1", "named-queue": "^2.2.1",
"needle": "^2.2.4", "needle": "^2.2.4",
"magnet-uri": "^5.1.7", "magnet-uri": "^5.1.7",
"parse-torrent-title": "git://github.com/TheBeastLT/parse-torrent-title.git#86dc66fc3b05d798f400d3a457720890dced4901", "parse-torrent-title": "git://github.com/TheBeastLT/parse-torrent-title.git#9e751ef6e0b4adb31d306d618c92f9feb84963bb",
"pg": "^7.8.2", "pg": "^7.8.2",
"pg-hstore": "^2.3.2", "pg-hstore": "^2.3.2",
"real-debrid-api": "git://github.com/TheBeastLT/node-real-debrid.git#935a5c23ae809edbcd2a111526a7f74d6767c50d", "real-debrid-api": "git://github.com/TheBeastLT/node-real-debrid.git#9e751ef6e0b4adb31d306d618c92f9feb84963bb",
"sequelize": "^4.43.0", "sequelize": "^4.43.0",
"stremio-addon-sdk": "^1.6.1", "stremio-addon-sdk": "^1.6.1",
"user-agents": "^1.0.559" "user-agents": "^1.0.559"

View File

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