mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-21 04:33:19 +03:00
Fixed issue where sometimes only the first video from a playlist would be registered
This commit is contained in:
@@ -290,7 +290,10 @@ async function downloadQueuedFile(download_uid) {
|
|||||||
for (let i = 0; i < output.length; i++) {
|
for (let i = 0; i < output.length; i++) {
|
||||||
let output_json = null;
|
let output_json = null;
|
||||||
try {
|
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) {
|
} catch(e) {
|
||||||
output_json = null;
|
output_json = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user