mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-05-15 12:02:00 +00:00
fix premiumize error messages
This commit is contained in:
parent
7422d3039b
commit
a689620f74
1 changed files with 2 additions and 2 deletions
|
|
@ -20,7 +20,7 @@ async function _getCachedStreams(PM, apiKey, streams) {
|
||||||
const hashes = streams.map(stream => stream.infoHash);
|
const hashes = streams.map(stream => stream.infoHash);
|
||||||
return PM.cache.check(hashes)
|
return PM.cache.check(hashes)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
if (error && error.message === 'customer_id and pin parameter missing or not logged in ') {
|
if (error && error.message === 'Not logged in.') {
|
||||||
return Promise.reject(BadTokenError);
|
return Promise.reject(BadTokenError);
|
||||||
}
|
}
|
||||||
console.warn('Failed Premiumize cached torrent availability request:', error);
|
console.warn('Failed Premiumize cached torrent availability request:', error);
|
||||||
|
|
@ -96,7 +96,7 @@ async function resolve({ ip, isBrowser, apiKey, infoHash, cachedEntryInfo, fileI
|
||||||
return _getCachedLink(PM, infoHash, cachedEntryInfo, fileIndex, ip, isBrowser)
|
return _getCachedLink(PM, infoHash, cachedEntryInfo, fileIndex, ip, isBrowser)
|
||||||
.catch(() => _resolve(PM, infoHash, cachedEntryInfo, fileIndex, ip, isBrowser))
|
.catch(() => _resolve(PM, infoHash, cachedEntryInfo, fileIndex, ip, isBrowser))
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
if (error && error.message && error.message.includes('purchase')) {
|
if (error && error.message && error.message.includes('Account not premium.')) {
|
||||||
console.log(`Access denied to Premiumize ${infoHash} [${fileIndex}]`);
|
console.log(`Access denied to Premiumize ${infoHash} [${fileIndex}]`);
|
||||||
return StaticResponse.FAILED_ACCESS;
|
return StaticResponse.FAILED_ACCESS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue