Skip to content

Instantly share code, notes, and snippets.

@tempoguyx
Created February 16, 2024 15:33
Show Gist options
  • Select an option

  • Save tempoguyx/325dc7432abe1b39c44b96eb2a42ac89 to your computer and use it in GitHub Desktop.

Select an option

Save tempoguyx/325dc7432abe1b39c44b96eb2a42ac89 to your computer and use it in GitHub Desktop.
Delete duplicates in Debrid Media Manager
// this should run only on this page.
// https://debridmediamanager.com/library?status=sametitleorhash&page=1
// open browser console (ctrl+ shift + I), paste this script.
const deleteDupe = async (el = document) => {
let items = el.querySelectorAll('table.w-full tr.align-middle');
let sleep = async (ms) => await new Promise(resolve => setTimeout(resolve, ms));
for (let i = 0; i < items.length; i++) {
let deleteButton = el.querySelector("#__next > div > div:nth-child(7) > table > tbody > tr:nth-child(1) > td.px-1.py-1.flex.place-content-center > button.cursor-pointer.mr-2.mb-2.text-red-500");
if (deleteButton) {
console.log(`--- Deleting ${i} of ${items.length} ----`);
deleteButton.click();
console.log(`--- Delete complete ---`);
await sleep(2000);
}
}
console.log('--- Done Deleting all duplicates ---');
}
deleteDupe();
@ankitabhattaraik
Copy link
Copy Markdown

This doesn't work anymore. Would you please revise it? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment