JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 04.03.2025, 17:53
KCOU KCOU is offline
Baby Loader
 
Join Date: Mar 2023
Posts: 8
Default Consolidate packages with the same name

When adding new yt videos with same package in "download" section i get two or more packages with the same name.

It is possible to write a script to consolidate packages with the same name?
f.e. when there are two packages with the same name and finished, just merge them and put all links on under the same packages. No file moving is required.

ty
Reply With Quote
  #2  
Old 05.03.2025, 10:09
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 74,755
Default

Hi,

Good news: A feature that automatically merges packages with the same name has recently been added. You can find more information here:
https://board.jdownloader.org/showth...692#post538692

Please keep the following in mind:
  • There is no "always auto-merge same-named packages" option yet — but it’s already being worked on.
  • Packages will only be merged automatically if they have the same name and the same download directory.

At the moment, a script is only necessary if you want to force automatic merging of same-named packages right away.

Feel free to try out the new feature and let us know your feedback.

If you’re interested, here’s the original request for this feature:
https://board.jdownloader.org/showthread.php?t=65451
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?

Last edited by pspzockerscene; 10.03.2025 at 13:33. Reason: Improved formatting
Reply With Quote
  #3  
Old 09.03.2025, 11:21
KCOU KCOU is offline
Baby Loader
 
Join Date: Mar 2023
Posts: 8
Default

Great! I tested it and worked fine. TYVM.
Reply With Quote
  #4  
Old 10.03.2025, 13:52
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 74,755
Default

Thanks for your feedback!
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #5  
Old 16.04.2025, 15:35
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,692
Default

Code:
/*
    merge download packages
    trigger : package finished
*/    

var key = package.name + package.downloadFolder;
var packageIds = [];
var linkIds = [];

getAllFilePackages().forEach(function(package) {
    if (package.finished && package.name + package.downloadFolder == key) {
        packageIds.push(package.UUID);
        linkIds = linkIds.concat(package.downloadLinks.map(function(link) {
            return link.UUID;
        }))
    }
})

if (packageIds.length > 1) {
    callAPI("downloadsV2", "moveLinks", linkIds, -1, packageIds[0]);
}
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 07:06.
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.