Fix for sync script
This commit is contained in:
1 parent
a38c6ebf7f
commit
1366284453
1 file changed
+9
-1
@@ -91,7 +91,15 @@ async function extractVideos(sourceUrl, browser = undefined, limit = 100) {
|
|||||||
if (videos.length > limit) {
|
if (videos.length > limit) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
videos.push(data.toString().trim())
|
newVideos = data.toString()
|
||||||
|
.split('\n')
|
||||||
|
.map(video => video.trim())
|
||||||
|
.filter(i => i);
|
||||||
|
|
||||||
|
newVideos.forEach(video => {
|
||||||
|
videos.push(video)
|
||||||
|
});
|
||||||
|
|
||||||
if (videos.length >= limit) {
|
if (videos.length >= limit) {
|
||||||
ytDlpProcess.kill()
|
ytDlpProcess.kill()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user