Skip to content

Commit 57c0a47

Browse files
committed
Easier deletion
1 parent 686e26b commit 57c0a47

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cytube_auto.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,15 @@ function update_playlist(use_cookie, headless, queue_delay, playlist_url, check_
302302
}
303303
// btn.btn-xs.btn-default.qbtn-[tmp/delete]
304304

305-
log("Removing bad entry...")
305+
log("Finding bad entry...")
306306
await page.click(`.queue_entry.${class_ids[i]} .btn-group .qbtn-${headless ? 'delete' : 'tmp'}`)
307-
if (!headless) getInput('Marked as temporary. Manual deletion required, press enter to continue:\n')
307+
if (!headless) {
308+
if (getInput('Marked as temporary. Delete? (y/n)\n').toLowerCase() === "y") {
309+
await page.click(`.queue_entry.${class_ids[i]} .btn-group .qbtn-delete`)
310+
// Just to see
311+
await delay(1000)
312+
}
313+
}
308314

309315
log("Adding replacement...")
310316
await page.type('#mediaurl', url_to_add)

0 commit comments

Comments
 (0)