Improved download fail backup method

This commit is contained in:
Tzahi12345
2024-09-21 23:08:42 -04:00
parent 7d3458ea41
commit a74bca05cc
3 changed files with 10 additions and 4 deletions

View File

@@ -529,7 +529,9 @@ exports.parseOutputJSON = (output, err) => {
let split_output = [];
// const output_jsons = [];
if (err && !output) {
if (!err.stderr.includes('This video is unavailable') && !err.stderr.includes('Private video')) {
const attempt_backup_errs = ['This video is unavailable', 'Private video', 'unavailable video'];
const attempt_backup = err.stderr ? attempt_backup_errs.some(err_msg => err.stderr.includes(err_msg)) : false;
if (!attempt_backup) {
return null;
}
logger.info('An error was encountered with at least one video, backup method will be used.')