[addon] use initial download link instead of transcoded
This commit is contained in:
@@ -85,13 +85,17 @@ async function _unrestrictLink(RD, link) {
|
|||||||
return Promise.reject("No available links found");
|
return Promise.reject("No available links found");
|
||||||
}
|
}
|
||||||
return RD._post('unrestrict/link', { form: { link }, proxy: getProxy() })
|
return RD._post('unrestrict/link', { form: { link }, proxy: getProxy() })
|
||||||
.then(unrestrictedLink => RD.streaming.transcode(unrestrictedLink.id))
|
.then(unrestrictedLink => {
|
||||||
.then(transcodedLink => {
|
console.log(`Unrestricted ${link} to ${unrestrictedLink.download}`);
|
||||||
const url = transcodedLink.apple && transcodedLink.apple.full
|
return Promise.resolve(unrestrictedLink.download);
|
||||||
|| transcodedLink[Object.keys(transcodedLink)[0]].full;
|
|
||||||
console.log(`Unrestricted ${link} to ${url}`);
|
|
||||||
return url;
|
|
||||||
});
|
});
|
||||||
|
// .then(unrestrictedLink => RD.streaming.transcode(unrestrictedLink.id))
|
||||||
|
// .then(transcodedLink => {
|
||||||
|
// const url = transcodedLink.apple && transcodedLink.apple.full
|
||||||
|
// || transcodedLink[Object.keys(transcodedLink)[0]].full;
|
||||||
|
// console.log(`Unrestricted ${link} to ${url}`);
|
||||||
|
// return url;
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCachedFileIds(fileIndex, hosterResults) {
|
function getCachedFileIds(fileIndex, hosterResults) {
|
||||||
|
|||||||
Reference in New Issue
Block a user