Fixed issue where sometimes only the first video from a playlist would be registered

pull/809/head
Tzahi12345 3 years ago
parent 7d1c5ff5d8
commit 0161f544aa

@ -290,7 +290,10 @@ async function downloadQueuedFile(download_uid) {
for (let i = 0; i < output.length; i++) {
let output_json = null;
try {
output_json = JSON.parse(output[i]);
// we have to do this because sometimes there will be leading characters before the actual json
const start_idx = output[i].indexOf('{"');
const clean_output = output[i].slice(start_idx, output[i].length);
output_json = JSON.parse(clean_output);
} catch(e) {
output_json = null;
}

Loading…
Cancel
Save