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().