JDownloader Community - Appwork GmbH

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 05.11.2020, 05:46
mgpai mgpai is offline
Script Master
Join Date: Sep 2013
Posts: 1,550

Originally Posted by GreenXIII View Post
... combine multiple downloaded links, with the same package name and same download directory, into a single package?
Keep a backup of your link list before testing/using the script.

    Merge download packages which have matching name and download folder, sorting links in descending order by ID.
    Trigger: Toolbar button pressed
    Customize main toolbar > Add a new "Eventscripter Trigger" button > Rename it to "Merge Packages" (case-sensitive) > Change Icon (optional)

if (name == "Merge Packages") {
    getAllFilePackages().forEach(function(package) {

        if (package) {
            var packages = [];

            getAllFilePackages().forEach(function(package2) {
                if (package2.name + package2.downloadFolder == package.name + package.downloadFolder) {

            if (packages.length > 1) {
                var linkIds = [];

                packages.forEach(function(package3) {
                    package3.downloadLinks.forEach(function(link) {

                linkIds.sort().forEach(function(linkId) {
                    callAPI("downloadsV2", "moveLinks", [linkId], -1, package.UUID);
Reply With Quote

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 13:21.
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 - 2024, Jelsoft Enterprises Ltd.