JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 28.11.2024, 17:06
FBD's Avatar
FBD FBD is offline
Giga Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 96
Post Copy links from the download list back to the linkgrabber

This script copies selected links already in the download list back to the linkgrabber.

Script requires the setup of a custom DownloadList context menu entry named "Copy to LinkGrabber" and the trigger "DownloadList Contextmenu Button Pressed" to work.

Spoiler:
Code:
// Copy links back to LinkGrabber {by fbd}
// 
// Trigger : "DownloadList Contextmenu Button Pressed"
//
// Add a custom meny entry to the DownloadList Context menu, name it "Copy to LinkGrabber"
// (or to any other name, that you also need to customize below)

disablePermissionChecks();

if (name == "Copy to LinkGrabber") {
    var links = dlSelection.getDownloadLinks();

    for (i = 0; i < links.length; i++) {
        var link = links[i];

        var urls = []; // try to get all urls that the link has associated
        if (link.getContentURL()) { urls.push(link.getContentURL()); }
        if (link.getContainerURL()) { urls.push(link.getContainerURL()); }
        if (link.getOriginURL()) { urls.push(link.getOriginURL()); }
        if (link.getUrl()) { urls.push(link.getUrl()); }
        if (link.getPluginURL()) { urls.push(link.getPluginURL()); }
        
        var myFilePackage = link.getPackage();

        callAPI("linkgrabberv2", "addLinks", {
            "deepDecrypt": false,
            "packageName": myFilePackage.getName(),
            "destinationFolder": myFilePackage.getDownloadFolder(),
            "links": urls.join("\r\n")
        });
    }
}


Direct download: raw.githubusercontent.com/FarBeyondDriven/JDscripts/refs/heads/main/CopyLinksToLinkGrabber.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 05:09.
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.