mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[addon] return premiumize link instead of stream_link
This commit is contained in:
@@ -61,7 +61,7 @@ async function getItemMeta(itemId, apiKey, ip) {
|
|||||||
id: `${KEY}:${file.id}:${index}`,
|
id: `${KEY}:${file.id}:${index}`,
|
||||||
title: file.name,
|
title: file.name,
|
||||||
released: new Date(file.created_at * 1000 - index).toISOString(),
|
released: new Date(file.created_at * 1000 - index).toISOString(),
|
||||||
stream: { url: file.stream_link || file.link }
|
stream: { url: file.link || file.stream_link }
|
||||||
}))
|
}))
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
@@ -121,7 +121,7 @@ async function _getCachedLink(PM, infoHash, encodedFileName, fileIndex, ip) {
|
|||||||
const targetVideo = Number.isInteger(fileIndex)
|
const targetVideo = Number.isInteger(fileIndex)
|
||||||
? videos.find(video => video.path.includes(targetFileName))
|
? videos.find(video => video.path.includes(targetFileName))
|
||||||
: videos.sort((a, b) => b.size - a.size)[0];
|
: videos.sort((a, b) => b.size - a.size)[0];
|
||||||
const unrestrictedLink = targetVideo.stream_link || targetVideo.link;
|
const unrestrictedLink = targetVideo.link || targetVideo.stream_link;
|
||||||
console.log(`Unrestricted Premiumize ${infoHash} [${fileIndex}] to ${unrestrictedLink}`);
|
console.log(`Unrestricted Premiumize ${infoHash} [${fileIndex}] to ${unrestrictedLink}`);
|
||||||
return unrestrictedLink;
|
return unrestrictedLink;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user