[addon] fixes proxy blacklisting

This commit is contained in:
TheBeastLT
2020-10-02 11:00:06 +02:00
parent 0f86b77a24
commit 38e4d7c7b5
2 changed files with 2 additions and 2 deletions

View File

@@ -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 };

View File

@@ -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))) {