JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 28.11.2024, 17:16
FBD's Avatar
FBD FBD is offline
Giga Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 96
Post Reset links on plugin defect

This script resets links that failed with plugin defect error message.

Intended to be triggered by Interval.

NOTE: Be careful using this script! If a download fails with the plugin defect message, most of the time a plugin update is needed! A simple reset won't magically make it work. Only when the error is caused by a connection issue or similar this can be useful.

Spoiler:
Code:
// Handle download errors (FBD)
// Trigger Required: Interval

var links = getAllDownloadLinks();

for (i = 0; i < links.length; i++) {
    
    var link = links[i];
    
    if (link.getStatus()) {
        if (link.isEnabled() 
            && (link.getFinalLinkStatus() == "ERROR_FATAL"
            || link.getFinalLinkStatus() == "HOSTER_UNAVAILABLE"
            || link.getFinalLinkStatus() == "CONNECTION_ISSUES"
            || link.getFinalLinkStatus() == "FAILED"
            || link.getFinalLinkStatus() == "FAILED_FATAL")) {

            // Force the download
            // callAPI("downloadsV2", "forceDownload", [link.getUUID()], []);

            // Reset the download (WARNING: Will discard already downloaded data)
            link.reset();

            // Disable the download
            // link.setEnabled(false);
            
            // Start downloads in case all downloads finished
            // startDownloads();
        }
    }
}


Direct download: raw.githubusercontent.com/FarBeyondDriven/JDscripts/refs/heads/main/ResetLinksOnPluginDefect.js
__________________
irc.libera.chat #jDownloader web.libera.chat/#jDownloader
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 04:36.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.