View Single Post
  #1469  
Old 25.07.2020, 16:28
sherbee sherbee is offline
JD Fan
 
Join Date: Mar 2019
Posts: 76
Default

Quote:
Originally Posted by mgpai View Post
Quite possible. I guess you will have to wait for the developers to confirm, and fix it if necessary. In the meanwhile, you can try this workaround.

Code:
var getArchiveFiles = function() {
    var log = archive.getExtractionLog();
    var count = 60; // max. seconds to wait for log

    while (!log && count) {
        log = archive.getExtractionLog();
        count--;
        sleep(1000);
    }

    if (log) {
        return archive.getExtractionLog().match(/\((DownloadLink|File)ArchiveFile\)File:[^|]+/g).map(function(string) {
            return string.replace(/.+?:(.+)/, "$1");
        });
    } else {
        alert("Log file for archive \"" + archive.getName() + "\" not found.");
        return [];
    }
}

getArchiveFiles().forEach(function(archiveFile) {
    // Do something with each archive file
    // alert(archiveFile);
})
No works yet.

Still geting error like: 'Wrapped org.appwork.exceptions.WTFException: java.io.FileNotFoundException: \jdownloader\logs\extracting\*.txt'

But it should report error message: 'Log file for archive "" + archive.getName() + "" not found.' Right?

So log check not works?
Reply With Quote