[addon] fixes proxy blacklisting
This commit is contained in:
@@ -123,7 +123,7 @@ function statusReady(statusCode) {
|
||||
}
|
||||
|
||||
function errorExpiredSubscriptionError(error) {
|
||||
return ['MUST_BE_PREMIUM', 'MAGNET_MUST_BE_PREMIUM'].includes(error.code);
|
||||
return ['MUST_BE_PREMIUM', 'MAGNET_MUST_BE_PREMIUM', 'FREE_TRIAL_LIMIT_REACHED'].includes(error.code);
|
||||
}
|
||||
|
||||
module.exports = { getCachedStreams, resolve };
|
||||
@@ -37,7 +37,7 @@ async function _getInstantAvailable(hashes, apiKey, retries = 3) {
|
||||
})
|
||||
.catch(error => {
|
||||
if (retries > 0 && ['ENOTFOUND', 'ETIMEDOUT'].some(v => error.message && error.message.includes(v))) {
|
||||
blacklistProxy(options.proxy);
|
||||
blacklistProxy(options.agent.proxy.host);
|
||||
return uncacheProxy('moch').then(() => _getInstantAvailable(hashes, apiKey, retries - 1));
|
||||
}
|
||||
if (retries > 0 && ['ESOCKETTIMEDOUT'].some(v => error.message && error.message.includes(v))) {
|
||||
|
||||
Reference in New Issue
Block a user