From ea1904e810ea72e4038f2161c11b4b61ba61902d Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Tue, 14 Dec 2021 10:29:37 +0300 Subject: [PATCH] Update update-database.js --- scripts/commands/update-database.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/commands/update-database.js b/scripts/commands/update-database.js index a69e2cc9c7..1d07cc2064 100644 --- a/scripts/commands/update-database.js +++ b/scripts/commands/update-database.js @@ -202,12 +202,12 @@ function parseResolution(streams) { function parseStatus(error, prevStatus) { if (error) { - if (error.includes('timed out')) { + if (['not_247', 'geo_blocked'].includes(prevStatus.code)) { + return prevStatus + } else if (error.includes('timed out')) { return statuses['timeout'] } else if (error.includes('403')) { return statuses['geo_blocked'] - } else if (['not_247', 'geo_blocked'].includes(prevStatus.code)) { - return prevStatus } return statuses['offline'] }