View Single Post
  #214  
Old 17.10.2017, 21:10
fred_gaou's Avatar
fred_gaou fred_gaou is offline
DSL User
 
Join Date: Mar 2016
Location: France
Posts: 37
Exclamation bug?

Let's say you have packages with disabled links (all are disabled for instance because of package context menu>disable).

Even if the progression is 0% if you use this script, it returns these packages as finished:

Code:
var aPackages = getAllFilePackages(); /*Get a list of all packages*/

var sText = ""; //will be filled with content (or not :-)

for (var i = 0; i < aPackages.length; i++) {
    var package = aPackages[i];
    var packageName = package.getName();
    var isFinished = package.isFinished();
    sText += "Package " + (i + 1) + " : " + packageName + " (finished: " + isFinished + ")\r\n";
}

alert(sText);
Workaround is to loop through the links in package to see if they are finished with isFinished().

Last edited by fred_gaou; 18.10.2017 at 00:07.
Reply With Quote