Skip to content

Commit d095a08

Browse files
committed
Fixed a bug I somehow missed, and also increased reliability
1 parent 6125e96 commit d095a08

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

cytube_auto.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function update_playlist(cookie, headless, queue_delay, url, check_blacklisted)
104104
await page.type('#mediaurl', videoData[index.ALT_LINK])
105105

106106
} else {
107-
if (skip_check) continue
107+
if (skip_check(videoData)) continue
108108
await page.type('#mediaurl', videoData[index.LINK]);
109109
}
110110

@@ -113,10 +113,12 @@ function update_playlist(cookie, headless, queue_delay, url, check_blacklisted)
113113
return
114114
}
115115

116-
// Cytube has a limit on how fast videos can be added so a
117-
// delay was needed whether puppeteer was used or not
118-
// I found that 600-1000 ms was enough of a delay to not face this issue
119-
// but the default value is 1000 just to be safe
116+
/* Cytube has a limit on how fast videos can be added so a
117+
delay was needed whether puppeteer was used or not
118+
I found that 600-1000 ms was enough of a delay to not face this issue
119+
but the default value is 2000 just to be safe since sometimes queing
120+
can take a bit longer before clearing the url entry box, which may cause errors
121+
*/
120122
await page.click('#queue_end')
121123
await delay(queue_delay + (!headless * 1000))
122124

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function get_flags() {
3737
})
3838

3939
for (var d_flag of delay)
40-
if (flags[d_flag] === undefined) flags[d_flag] = 1000
40+
if (flags[d_flag] === undefined) flags[d_flag] = 2000
4141

4242
return flags
4343
}

0 commit comments

Comments
 (0)