Quote:
Originally Posted by qayaq
Unfortunately JD freezes at 100% CPU forever with this script, if there are many packages (about 3000) /downloads...
|
Can happen with that many links with that particular trigger. I do not have as many links in my list to test any script with alternative triggers /settings.
You can use this script to create a custom toolbar button which can be clicked to detect/disable dupes.
Code:
// Disable (instagram) links if file exists on disk
// Trigger: Toolbar Buttton Pressed
// Customaize Main Toolbar > Add a new "Eventscripter Trigger" button > Rename it to "Disable Dupes" (without quotes/case-sensitive)
if (name == "Disable Dupes") {
getAllDownloadLinks().forEach(function(link) {
if (!link.enabled) return;
if (link.host != "instagram.com") return;
if (!getPath(link.downloadPath).exists()) return;
link.setEnabled(false);
});
}
Code:
// Disable (instagram) links if file exists on disk
// Trigger: Toolbar Buttton Pressed
// Customaize Main Toolbar > Add New "Eventscripter Trigger" button > Rename it to "Disable Dupes" (without quotes/case-sensitive)
if (name == "Disable Dupes") {
getAllFilePackages().forEach(function(package) {
if (package.isFinished()) return;
package.getDownloadLinks().forEach(function(link) {
if (link.isFinished()) return;
if (!link.enabled) return;
if (link.host != "instagram.com") return;
if (!getPath(link.downloadPath).exists()) return;
link.setEnabled(false);
});
});
}