View Single Post
  #2520  
Old 09.12.2022, 12:22
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,232
Default

Quote:
Originally Posted by DerChrimtess View Post
@Jiaz
A script that just enables the first file of all packages in my download list is sufficient Can you help me with that
Please ask mgpai for help with this. I'm sure he will do some real magic and come up with super easy solution for this.

Update: see here for script that enables first link of each package, disables the rest, in download list you can place it at any trigger that suits you best
Code:
getAllFilePackages().forEach(function(package) {
    var first = true;
    package.getDownloadLinks().forEach(function(link) {
        if (first) {
            link.setEnabled(true);
            first = false;
        } else {
            link.setEnabled(false);
        }
    });
});
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 09.12.2022 at 12:27.
Reply With Quote