#1
|
|||
|
|||
![]()
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 |
#2
|
||||
|
||||
![]()
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:
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 Last edited by pspzockerscene; 10.03.2025 at 13:33. Reason: Improved formatting |
#3
|
|||
|
|||
![]()
Great! I tested it and worked fine. TYVM.
|
#4
|
||||
|
||||
![]()
Thanks for your feedback!
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#5
|
|||
|
|||
![]() 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]); } |
![]() |
Thread Tools | |
Display Modes | |
|
|