[addon] adds debrid meta catalogs for RD and AD

This commit is contained in:
TheBeastLT
2020-12-13 13:43:59 +01:00
parent c92fba18e7
commit 37c1c0e298
10 changed files with 213 additions and 25 deletions

View File

@@ -15,7 +15,7 @@ function getRandomProxy() {
if (PROXY_HOSTS && PROXY_HOSTS.length && PROXY_USERNAME && PROXY_PASSWORD) {
const index = new Date().getHours() % PROXY_HOSTS.length;
const proxyHost = PROXY_HOSTS[index];
console.log(`${new Date()} Using ${proxyHost} proxy`);
console.log(`${new Date().toISOString()} Using ${proxyHost} proxy`);
return `https://${PROXY_USERNAME}:${PROXY_PASSWORD}@${proxyHost}:${PROXY_PORT}`;
}
console.warn('No proxy configured!');
@@ -28,7 +28,7 @@ function getProxyAgent(proxy) {
function blacklistProxy(proxy) {
const proxyHost = proxy.replace(/.*@/, '');
console.warn(`${new Date()} Blacklisting ${proxyHost}`);
console.warn(`${new Date().toISOString()} Blacklisting ${proxyHost}`);
if (PROXY_HOSTS && PROXY_HOSTS.indexOf(proxyHost) > -1) {
PROXY_HOSTS.splice(PROXY_HOSTS.indexOf(proxyHost), 1);
}