[addon] moch classes formatting
This commit is contained in:
@@ -2,7 +2,7 @@ const AllDebridClient = require('all-debrid-api');
|
||||
const isVideo = require('../lib/video');
|
||||
const StaticResponse = require('./static');
|
||||
const { getRandomProxy, getRandomUserAgent } = require('../lib/request_helper');
|
||||
const { cacheWrapResolvedUrl, cacheWrapProxy, cacheUserAgent } = require('../lib/cache');
|
||||
const { cacheWrapProxy, cacheUserAgent } = require('../lib/cache');
|
||||
|
||||
async function getCachedStreams(streams, apiKey) {
|
||||
const options = await getDefaultOptions(apiKey);
|
||||
@@ -99,15 +99,15 @@ async function getDefaultOptions(id, ip) {
|
||||
}
|
||||
|
||||
function statusError(statusCode) {
|
||||
return [5, 6, 7, 8, 9, 10, 11].includes(statusCode)
|
||||
return [5, 6, 7, 8, 9, 10, 11].includes(statusCode);
|
||||
}
|
||||
|
||||
function statusHandledError(statusCode) {
|
||||
return [5, 7, 9, 10].includes(statusCode)
|
||||
return [5, 7, 9, 10].includes(statusCode);
|
||||
}
|
||||
|
||||
function statusDownloading(statusCode) {
|
||||
return [0, 1, 2, 3].includes(statusCode)
|
||||
return [0, 1, 2, 3].includes(statusCode);
|
||||
}
|
||||
|
||||
function statusReady(statusCode) {
|
||||
|
||||
@@ -3,7 +3,7 @@ const { encode } = require('magnet-uri');
|
||||
const isVideo = require('../lib/video');
|
||||
const StaticResponse = require('./static');
|
||||
const { getRandomProxy, getRandomUserAgent } = require('../lib/request_helper');
|
||||
const { cacheWrapResolvedUrl, cacheWrapProxy, cacheUserAgent } = require('../lib/cache');
|
||||
const { cacheWrapProxy, cacheUserAgent } = require('../lib/cache');
|
||||
|
||||
async function getCachedStreams(streams, apiKey) {
|
||||
const options = await getDefaultOptions(apiKey);
|
||||
@@ -93,15 +93,15 @@ async function _retryCreateTorrent(PM, infoHash, encodedFileName, fileIndex) {
|
||||
}
|
||||
|
||||
function statusError(status) {
|
||||
return ['deleted', 'error', 'timeout'].includes(status)
|
||||
return ['deleted', 'error', 'timeout'].includes(status);
|
||||
}
|
||||
|
||||
function statusDownloading(status) {
|
||||
return ['waiting', 'queued', 'running'].includes(status)
|
||||
return ['waiting', 'queued', 'running'].includes(status);
|
||||
}
|
||||
|
||||
function statusReady(status) {
|
||||
return status === 'finished';
|
||||
return ['finished', 'seeding'].includes(status);
|
||||
}
|
||||
|
||||
async function getDefaultOptions(id, ip) {
|
||||
|
||||
@@ -156,7 +156,7 @@ function statusWaitingSelection(status) {
|
||||
}
|
||||
|
||||
function statusDownloading(status) {
|
||||
return ['downloading', 'queued'].includes(status)
|
||||
return ['downloading', 'queued'].includes(status);
|
||||
}
|
||||
|
||||
function statusReady(status) {
|
||||
|
||||
Reference in New Issue
Block a user