JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1481  
Old 28.07.2020, 14:11
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,918
Default

@Mydgard
If I understand correctly, you WANT all files to go into the "Verschiedene Dateien" package?
You can easily do this via Packagizer rule, see the following screenshot:

Once activated, all URLs you add afterwards will go into a package named "Verschiedene Dateien".

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #1482  
Old 29.07.2020, 06:25
savey savey is offline
DSL Light User
 
Join Date: May 2019
Posts: 34
Exclamation automatic process playlist

hi I have a problem when I catch certain links with
1- "add new web links" and then click on
2- "continue with option - 3 start deep connection analysis"
4- start the windows "drag to download" and the window at the bottom right of "search links"
5- every now and then, it depends on the quantity of connections, I get a window with "PROCESS PLAYLIST" written where I should always click to download other files.
This is what I do, the problem is, can I have a script, a rule, which allows me automatically without me not manually interfacing, that process playlist always goes ok, automatically?
Thanks I hope someone helps me.
Reply With Quote
  #1483  
Old 30.07.2020, 05:16
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

playlist for youtube? check settings > plugins > youtube
as it has pre defined playlist options there, with a default on ask.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #1484  
Old 31.07.2020, 11:34
Mydgard Mydgard is offline
Fibre Channel User
 
Join Date: Jan 2011
Location: Germany
Posts: 115
Default

Quote:
Originally Posted by raztoki View Post
@Mydgard
verschiedene dateien = various files
in english the title is just various, you can disable various in advanced settings
settings > advanced settings > LinkgrabberSettings.variouspackageenabled
you can also edit a threshold which links are no longer in various LinkgrabberSettings.variouspackagelimit
Hi Raztoki,


found at least LinkgrabberSettings.variouspackage not LinkgrabberSettings.variouspackageenabled ... anyway, after i disabled it it tried to put in links, but they are still separated into another folder ... is this a thing where i have to restart jd2 prior to work?

Will try that eventscripter thing from psp

EDIT: Okay okay it is Packagizer not event scripter

Last edited by Mydgard; 31.07.2020 at 12:42.
Reply With Quote
  #1485  
Old 31.07.2020, 12:47
Mydgard Mydgard is offline
Fibre Channel User
 
Join Date: Jan 2011
Location: Germany
Posts: 115
Default

Okay the packagizer just works thx psp

BTW found a example eventscripter "Download zurücksetzen wenn Geschwindigkeit niedrig", can anyone explain a little bit? Would like to use that only for rapidgator

Thx in advance.
Reply With Quote
  #1486  
Old 31.07.2020, 17:13
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by Mydgard View Post
... found a example eventscripter "Download zurücksetzen wenn Geschwindigkeit niedrig", can anyone explain a little bit?
Explanation is provided in script comments (green colored text).

Quote:
Originally Posted by Mydgard View Post
Would like to use that only for rapidgator
Replace the example script with the following:

Code:
//check if downloads are running at all
if (isDownloadControllerRunning() && !isDownloadControllerStopping()) {
    var running = getRunningDownloadLinks();
    //loop through all running Downloads
    for (var i = 0; i < running.length; i++) {
        //check if download host is rapidgator.net
        if (running[i].getHost() == "rapidgator.net") {
            //check if the download has been running at least 30 seconds
            if (running[i].getDownloadDuration() > 30000) {
                //check if the current speed is below 50kb/s
                if (running[i].getSpeed() < 50 * 1024) {
                    //stop the download and restart it
                    running[i].abort();
                }
            }
        }
    }
}
Reply With Quote
  #1487  
Old 31.07.2020, 19:12
Mydgard Mydgard is offline
Fibre Channel User
 
Join Date: Jan 2011
Location: Germany
Posts: 115
Default

Thx mgpai, will try that maybe you can help me with another "script"? I used the packagizer thing from pspzockerscene, works quite good, but i would like to have a button in the toolbar to activate/deactivate it ... with the provided link https://support.jdownloader.org/Know...to-jdownloader i managed to get a new button in tool bar, but how to connect the newly added button with the packagizer thing?

Do you have any idea? Dunno much about javascript etc ...
Reply With Quote
  #1488  
Old 01.08.2020, 08:08
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by Mydgard View Post
... I used the packagizer ... i would like to have a button in the toolbar to activate/deactivate it ...
Code:
/*
    Toggle packagizer extension
    Trigger: Toolbar Button Pressed
    Customize main toolbar > Add a new 'Eventscripter Trigger' button > Rename it to "Toggle Packagizer" (without quotes, case-sensitive) > Change Icon (optional)
*/

if (name == "Toggle Packagizer") {
    var interfaceName = "org.jdownloader.controlling.packagizer.PackagizerSettings",
        key = "PackagizerEnabled",
        value = callAPI("config", "get", interfaceName, null, key),
        message = "Packagizer " + (value ? "disabled." : "enabled.");

    callAPI("config", "set", interfaceName, null, key, !value) && alert(message);
}
Reply With Quote
  #1489  
Old 01.08.2020, 09:44
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

@Mydgard google translate not perfect, I covered by basis with either telling you if you disable it will package all into respective package names, else you could increase the threshold to package more into various. If decrypter plugins define packagename it would override various. So yah psp recommendation of package customiser would be the better solution if you want to stop that also.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #1490  
Old 01.08.2020, 10:52
sherbee sherbee is offline
JD Fan
 
Join Date: Mar 2019
Posts: 76
Default

Quote:
Originally Posted by mgpai View Post
It effectively does the same thing. The files will be moved as soon as the log file is available in the 'extracting' folder and queried. How fast you want it to be processed will depend on the the trigger you use.
Why now after automtic extract one file log file remain in /open folder? It not move to /extraction folder even after JDownloader close?
I must check now 2 folders for log?
And it all workaround because 'archive.getExtractionLog()' not works?
Reply With Quote
  #1491  
Old 10.08.2020, 17:29
59grcGTj 59grcGTj is offline
Modem User
 
Join Date: Aug 2020
Posts: 1
Default

Hi,

I have a quick question about how I can get the download link of a file. I tried:
  • getContentURL() - returns 'null'
  • getOriginURL() - returns 'null'
  • getUrl() - returns 'null'

is it buggy or not possible?

Last edited by 59grcGTj; 10.08.2020 at 17:32.
Reply With Quote
  #1492  
Old 10.08.2020, 22:18
Karli Karli is offline
Zetta Loader
 
Join Date: Jun 2015
Posts: 192
Default hilfegesuch für ein script

hiho,

ich verwende ein hier vorgestelltes script zum automatischen downloaden von proxys. funzt soweit immer noch super.

ich würde allerdings gerne div. ports dieser proxyliste auf ne blacklist legen, da proxys mit diesen ports sowieso nie erfolgreiche downloads bringen.
vieleicht ähnlich zu der schon vorhandenen country filterliste?

jetzt frag ich mich als programmier-noob, ob mir jemand das script selber pimpen könnte, oder was dazu schreiben könnte?

damit wir nicht immer nach dem script suchen müssen, post ichs hier nochmal rein, wenn ich darf ...
Code:
disablePermissionChecks();
setNotifyOnException(false);
setAdvancedAlert(true);

// Proxylist updates for hosters (e.g. Zippyshare.com)
// Trigger: Interval (e.g. 10000ms)

var refreshtime = "900"; // (e.g. 900s)
var myCountries = ["GB", "DE", "FR"]; //Filterlist for countries
var max_response_time = 2; //1.5 or higher (e.g. 2), 1 is too low
var proxy_test = 0; //1=ON,0=OFF (very slow)
var max_proxies = 0; //0=Unlimited
var standard_filter = " \"filter\" : {\"type\" : \"WHITELIST\",\"entries\" : [ \"hoster 1\", \"hoster 2\"]},"; //\"filter\" : null, 
var add_proxy = JSON.parse("{\"proxy\" : {\"username\" : null,\"password\" : null,\"port\" : 80,\"address\" : null,\"type\" : \"NONE\",\"preferNativeImplementation\" : false,\"resolveHostName\" : false,\"connectMethodPrefered\" : false},\"rangeRequestsSupported\" : true," + standard_filter + "\"pac\" : false,\"reconnectSupported\" : false,\"enabled\" : true}");
var filter = new Array();

var old_proxylist = [];
var new_proxylist = "";

var settings = "org.jdownloader.updatev2.InternetConnectionSettings";
var storage = "cfg/org.jdownloader.settings.InternetConnectionSettings";
old_proxylist = callAPI("config", "get", settings, storage, "customproxylist");

if (IsValidname() || IsValidinterval() && ((Math.round(Date.now() / 1000) - getProperty("LastProxyUpdate", true)) >= refreshtime) && !getProperty("updatingProxy", true) || getProperty("updatingProxy", true)) {
    if (!getProperty("updatingProxy", true)) {
        setProperty("LastProxyUpdate", Math.round(Date.now() / 1000), true);
    } else {
        if (getProperty("updatingProxy", true)) {
            setProperty("updatingProxy", false, true);
        }
    }

    var html;
    try {
        html = getPage("https" + "://raw.githubusercontent.com/fate0/proxylist/master/proxy.list");

        var lines = html.split("\n");

        for (var key in old_proxylist) {
            if (old_proxylist.hasOwnProperty(key)) {
                if (old_proxylist[key].proxy.type == "DIRECT" || old_proxylist[key].proxy.type == "NONE" || old_proxylist[key].enabled == false) {
                    if (new_proxylist == "") {
                        new_proxylist += JSON.stringify(old_proxylist[key]);
                    } else {
                        new_proxylist += "," + JSON.stringify(old_proxylist[key]);
                    }
                }
            }
        }

        var myBr = getBrowser();
        for (var i = 0; i < lines.length; ++i) {
            if (IsValidJSONString(lines[i])) {
                var temp_JSON = JSON.parse(lines[i]);
                var add_proxy_new = add_proxy;
                add_proxy_new.proxy.type = temp_JSON.type.toUpperCase();
                add_proxy_new.proxy.port = temp_JSON.port;
                add_proxy_new.proxy.address = temp_JSON.host;
                if (myCountries.indexOf(temp_JSON.country) > -1 || temp_JSON.response_time > max_response_time) {
                    continue; //skip proxy
                }
                var errorcheck = 0;
                if (proxy_test == 1) {
                    myBr.setProxy(temp_JSON.type + "://" + temp_JSON.host + ":" + temp_JSON.port);
                    try {
                        myBr.getPage("http://www.google.de/");
                    } catch (e) {
                        errorcheck = 1;
                    }
                }

                if (errorcheck == 0 && proxy_test == 1 || proxy_test != 1) {

                    if (add_proxy_new.proxy.address && filter[temp_JSON.host] != true) {
                        filter[temp_JSON.host] = true;
                        if (new_proxylist == "") {
                            new_proxylist += JSON.stringify(add_proxy_new);
                        } else {
                            new_proxylist += "," + JSON.stringify(add_proxy_new);
                        }
                    }
                }
            }
            if (i >= max_proxies && max_proxies > 0) {
                break;
            }
        }
        callAPI("config", "set", settings, storage, "customproxylist", "[" + new_proxylist + "]");
    } catch (e) {}
}

function IsValidJSONString(str) {
    if (typeof str !== "string") {
        return false;
    }
    try {
        JSON.parse(str);
    } catch (e) {
        return false;
    }
    return true;
}

function IsValidname() {
    try {
        if (name == "Geoblocking: zippy") {
            return true;
        }
    } catch (e) {
        return false;
    }
    return true;
}

function IsValidinterval() {
    try {
        if (interval >= 10000) {
            return true;
        }
    } catch (e) {
        return false;
    }
    return true;
}
vielen thx schon mal für jeden tropfen fremden gehirnschmalzes *g*
Reply With Quote
  #1493  
Old 11.08.2020, 06:53
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by 59grcGTj View Post
... how I can get the download link of a file ...
If the URL is protected, you may need to use:
Code:
var myString = myDownloadLink.getPluginURL();
Reply With Quote
  #1494  
Old 11.08.2020, 14:56
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,918
Default

@Karli
Ich habe die EventScripter Threads soeben zusammengeführt.
Es gibt hier den User mgpai, der gerne bei sowas hilft ... ich empfehle dir jedoch trotzdem, deine Anfrage nochmals in Englisch in diesem Thread zu stellen (Falls nötig Übersetzer verwenden).

Grüße, psp
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #1495  
Old 11.08.2020, 15:20
Karli Karli is offline
Zetta Loader
 
Join Date: Jun 2015
Posts: 192
Default

thx @pspzockerscene

short in (d)englisch *g*

is ist possible, to add an blacklist for certain ports in this script like the blacklist for countrycodes?
Reply With Quote
  #1496  
Old 11.08.2020, 15:26
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,918
Default

Quote:
Originally Posted by Karli View Post
is ist possible, to add an blacklist for certain ports in this script like the blacklist for countrycodes?
* addition:
He is talking about that proxy script, see his last post.

@mgpai:
Wouldn't it make sense to setup a GitHub repo for all of these scripts?

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #1497  
Old 11.08.2020, 18:32
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by Karli View Post
... is ist possible, to add an blacklist for certain ports in this script like the blacklist for countrycodes?
Code:
disablePermissionChecks();
setNotifyOnException(false);
setAdvancedAlert(true);

// Proxylist updates for hosters (e.g. Zippyshare.com)
// Trigger: Interval (e.g. 10000ms)

var refreshtime = "900"; // (e.g. 900s)
var myCountries = ["GB", "DE", "FR"]; //Filterlist for countries
var myPorts = [2333, 10174]; //Proxy port blacklist (Added by mgpai)
var max_response_time = 2; //1.5 or higher (e.g. 2), 1 is too low
var proxy_test = 0; //1=ON,0=OFF (very slow)
var max_proxies = 0; //0=Unlimited
var standard_filter = " \"filter\" : {\"type\" : \"WHITELIST\",\"entries\" : [ \"hoster 1\", \"hoster 2\"]},"; //\"filter\" : null, 
var add_proxy = JSON.parse("{\"proxy\" : {\"username\" : null,\"password\" : null,\"port\" : 80,\"address\" : null,\"type\" : \"NONE\",\"preferNativeImplementation\" : false,\"resolveHostName\" : false,\"connectMethodPrefered\" : false},\"rangeRequestsSupported\" : true," + standard_filter + "\"pac\" : false,\"reconnectSupported\" : false,\"enabled\" : true}");
var filter = new Array();

var old_proxylist = [];
var new_proxylist = "";

var settings = "org.jdownloader.updatev2.InternetConnectionSettings";
var storage = "cfg/org.jdownloader.settings.InternetConnectionSettings";
old_proxylist = callAPI("config", "get", settings, storage, "customproxylist");

if (IsValidname() || IsValidinterval() && ((Math.round(Date.now() / 1000) - getProperty("LastProxyUpdate", true)) >= refreshtime) && !getProperty("updatingProxy", true) || getProperty("updatingProxy", true)) {
    if (!getProperty("updatingProxy", true)) {
        setProperty("LastProxyUpdate", Math.round(Date.now() / 1000), true);
    } else {
        if (getProperty("updatingProxy", true)) {
            setProperty("updatingProxy", false, true);
        }
    }

    var html;
    try {
        html = getPage("https" + "://raw.githubusercontent.com/fate0/proxylist/master/proxy.list");

        var lines = html.split("\n");

        for (var key in old_proxylist) {
            if (old_proxylist.hasOwnProperty(key)) {
                if (old_proxylist[key].proxy.type == "DIRECT" || old_proxylist[key].proxy.type == "NONE" || old_proxylist[key].enabled == false) {
                    if (new_proxylist == "") {
                        new_proxylist += JSON.stringify(old_proxylist[key]);
                    } else {
                        new_proxylist += "," + JSON.stringify(old_proxylist[key]);
                    }
                }
            }
        }

        var myBr = getBrowser();
        for (var i = 0; i < lines.length; ++i) {
            if (IsValidJSONString(lines[i])) {
                var temp_JSON = JSON.parse(lines[i]);
                var add_proxy_new = add_proxy;
                add_proxy_new.proxy.type = temp_JSON.type.toUpperCase();
                add_proxy_new.proxy.port = temp_JSON.port;
                add_proxy_new.proxy.address = temp_JSON.host;

                if (myCountries.indexOf(temp_JSON.country) > -1 || temp_JSON.response_time > max_response_time || myPorts.indexOf(temp_JSON.port) > -1) { // myPorts.indexOf(temp_JSON.port) > -1 (added by mgpsi)
                    continue; //skip proxy
                }
                var errorcheck = 0;
                if (proxy_test == 1) {
                    myBr.setProxy(temp_JSON.type + "://" + temp_JSON.host + ":" + temp_JSON.port);
                    try {
                        myBr.getPage("http://www.google.de/");
                    } catch (e) {
                        errorcheck = 1;
                    }
                }

                if (errorcheck == 0 && proxy_test == 1 || proxy_test != 1) {

                    if (add_proxy_new.proxy.address && filter[temp_JSON.host] != true) {
                        filter[temp_JSON.host] = true;
                        if (new_proxylist == "") {
                            new_proxylist += JSON.stringify(add_proxy_new);
                        } else {
                            new_proxylist += "," + JSON.stringify(add_proxy_new);
                        }
                    }
                }
            }
            if (i >= max_proxies && max_proxies > 0) {
                break;
            }
        }
        callAPI("config", "set", settings, storage, "customproxylist", "[" + new_proxylist + "]");
    } catch (e) {}
}

function IsValidJSONString(str) {
    if (typeof str !== "string") {
        return false;
    }
    try {
        JSON.parse(str);
    } catch (e) {
        return false;
    }
    return true;
}

function IsValidname() {
    try {
        if (name == "Geoblocking: zippy") {
            return true;
        }
    } catch (e) {
        return false;
    }
    return true;
}

function IsValidinterval() {
    try {
        if (interval >= 10000) {
            return true;
        }
    } catch (e) {
        return false;
    }
    return true;
}
Reply With Quote
  #1498  
Old 11.08.2020, 18:36
Karli Karli is offline
Zetta Loader
 
Join Date: Jun 2015
Posts: 192
Default

oh wow!

it works fine

big thx!!!!

Last edited by Karli; 11.08.2020 at 18:40.
Reply With Quote
  #1499  
Old 11.08.2020, 18:53
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by pspzockerscene View Post
Wouldn't it make sense to setup a GitHub repo for all of these scripts?
Are you planning to? Maybe you can also make packagizer/linkfilter/linkcrawler/domain rules available in the same repo.
Reply With Quote
  #1500  
Old 12.08.2020, 10:34
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,918
Default

Quote:
Originally Posted by mgpai View Post
Are you planning to? Maybe you can also make packagizer/linkfilter/linkcrawler/domain rules available in the same repo.
Nope nothing is officially planned but I would link it in our new help articles

I also have github so I might even contribute

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #1501  
Old 17.08.2020, 04:33
woriamu woriamu is offline
Junior Loader
 
Join Date: Jun 2020
Posts: 12
Default

Quote:
Originally Posted by mgpai View Post
Note: This script will delete links from the download list. Keep a backup of link list before running the script.

Code:
// Reset finished link, if size is zero bytes
// Trigger: JDownloader Started

getAllDownloadLinks().forEach(function(link) {
    if (link.finished && !link.bytesTotal) {
        link.reset();
    }
})

Unlike the other script which queries a single link, this queries all links, which will use more system resources each time it is executed, especially if you lot of links in the list. So disable it once the existing links in the list are reset.
Sorry for the late response, but this isn't working and I'm not sure why. Also, I'm not sure if this is important but under line 350 of the script editor help tab it says that this event will never be triggered. And thanks again for all your help.

Code:
/* =============== Global API =============== */
/* =========  Methods =========*/
alert(myObject[]);/*Show a Message Box*/
/* Example: */alert(JD_HOME);
var myObject = callAPI(myString, myString, myObject[]);/*Call the MyJDownloader API*/
/* Example: */callAPI("downloadsV2", "queryLinks", { "name": true})
callAsync(myFunction, myString[]);/*Call a local Process asynchronous*/
/* Example: */callAsync(function(exitCode,stdOut,errOut){ alert("Closed Notepad");},"notepad.exe",JD_HOME+"\\license.txt");
var myString = callSync(myString[]);/*Call a local Process. Blocks Until the process returns*/
/* Example: */var pingResultString = callSync("ping","jdownloader.org");
var myBoolean = deleteFile(myString/*path*/, myBoolean/*recursive*/);/*Delete a file or a directory*/
/* Example: */var myBooleanResult=deleteFile(JD_HOME+"/mydirectory/",false);
disablePermissionChecks();/*disable permission checks*/
var myBoolean = doReconnect();/*Perform a reconnect and wait for it*/
/* Example: */var success= doReconnect();
enablePermissionChecks();/*enable permission checks*/
var myString = experimental_proxybanlist();/*(experimental) Get proxy banlist*/
/* Example: */experimental_proxybanlist();
var myString = experimental_proxylist();/*(experimental) Get proxy list*/
/* Example: */experimental_proxylist();
var myCrawledLink[] = getAllCrawledLinks();/*Get a list of all crawledlinks*/
var myCrawledPackage[] = getAllCrawledPackages();/*Get a list of all crawledpackages*/
var myDownloadLink[] = getAllDownloadLinks();/*Get a list of all downloadlinks*/
var myFilePackage[] = getAllFilePackages();/*Get a list of all packages*/
var myLong = getAverageSpeed();/*Get current average Download Speed in bytes/second*/
var myBrowser = getBrowser();/*Get an Environment Object*/
var myString = getChecksum(myString, myString);/*Create a Checksum for a file. Types: e.g. CRC32, md5, SHA-1, SHA-256*/
var myCrawledLink = getCrawledLinkByUUID(myLong/*uuid*/);/*Get a CrawledLink Link by it's uuid*/
var myCrawledPackage = getCrawledPackageByUUID(myLong/*uuid*/);/*Get a CrawledLink Package by it's uuid*/
var myDownloadLink = getDownloadLinkByUUID(myLong/*uuid*/);/*Get a DownloadList Link by it's uuid*/
var myFilePackage = getDownloadPackageByUUID(myLong/*uuid*/);/*Get a DownloadList Package by it's uuid*/
var myString = getEnv(myString/*environment variable*/);/*Gets the value of the specified environment variable*/
var myEnvironment = getEnvironment();/*Get an Environment Object*/
var myString = getPage(myString/*URL*/);/*Loads a website (Method: GET) and returns the source code*/
/* Example: */var myhtmlSourceString=getPage("http://jdownloader.org");
var myFilePath = getPath(myString/*Path to a file or folder*/);/*Get a FilePath Object*/
var myObject = getProperty(myString/*"key"*/, myBoolean/*global(boolean)*/);/*Get a Property. Set global to true if you want to access a global property*/
/* Example: */var value=getProperty("myobject", false);
var myDownloadLink[] = getRunningDownloadLinks();/*Get a list of all running downloadlinks*/
var myFilePackage[] = getRunningDownloadPackages();/*Get a list of all running packages*/
var myLong = getTotalSpeed();/*Get current total Download Speed in bytes/second*/
var myBoolean = isDownloadControllerIdle();/*Check if Download Controller is in IDLE State*/
var myBoolean = isDownloadControllerPaused();/*Check if Download Controller is in PAUSE State*/
var myBoolean = isDownloadControllerRunning();/*Check if Download Controller is in RUNNING State*/
var myBoolean = isDownloadControllerStopping();/*Check if Download Controller is in STOPPING State (Still running, but stop has been pressed)*/
var myBoolean = isSynchronous();/*is current script run in synchronous mode?*/
log(myObject[]);/*Log to stderr and to JDownloader Log Files*/
openURL(myString/*URL*/);/*Open a website or path in your default browser/file explorer*/
/* Example: */openURL("http://jdownloader.org");
playWavAudio(myString/*myFilePathOrUrl*/);/*Play a Wav Audio file*/
/* Example: */playWavAudio(JD_HOME+"/themes/standard/org/jdownloader/sounds/captcha.wav");
var myString = postPage(myString/*URL*/, myString/*PostData*/);/*Loads a website (METHOD: POST) and returns the source code*/
/* Example: */var myhtmlSourceString=postPage("http://support.jdownloader.org/index.php","searchquery=captcha");
var myString = readFile(myString/*filepath*/);/*Read a text file*/
/* Example: */var myString=readFile(JD_HOME+"/license.txt");
refreshAccounts(myBoolean/*true|false (Wait for account checks)*/, myBoolean/*true|false (Force Check)*/);/*Refresh all premium accounts*/
/* Example: */refreshAccounts(true,true);
var myBoolean = removeCrawledLinkByUUID(myString);/*Remove a crawledlink by uuid*/
var myBoolean = removeCrawledPackageByUUID(myString);/*Remove a crawledpackage by uuid*/
var myBoolean = removeDownloadLinkByUUID(myString);/*Remove a downloadlink by uuid*/
var myBoolean = removeFilePackageByUUID(myString);/*Remove a package by uuid*/
requestReconnect();/*Request a reconnect*/
/* Example: */requestReconnect();
require(myString/*myFilePathOrUrl*/);/*Loads a Javascript file or url. ATTENTION. The loaded script can access the API as well.*/
/* Example: */require("**External links are only visible to Support Staff**);
setAdvancedAlert(myBoolean);/*enable/disable alert with textbox and copy&paste*/
setDisableOnException(myBoolean);/*enable/disable script on exceptions*/
setDownloadsPaused(myBoolean);/*Pause/Unpause Downloads*/
setNotifyOnException(myBoolean);/*enable/disable notification on exceptions*/
var myObject = setProperty(myString/*"key"*/, myObject/*anyValue*/, myBoolean/*global(boolean)*/);/*Set a Property. This property will be available until JD-exit or a script overwrites it. if global is true, the property will be available for al scripts*/
/* Example: */var oldValue=setProperty("myobject", { "name": true}, false);
setSpeedlimit(myInt/*speedlimit in bytes/second*/);/*Set the Speedlimit in bytes/second. Values<=0 -> Disable Limiter*/
sleep(myInt/*milliseconds*/);/*Perform a sleep and wait for x milliseconds*/
/* Example: */sleep(1000);
startDownloads();/*Start Downloads*/
stopDownloads();/*Stop Downloads*/
writeFile(myString/*filepath*/, myString/*myText*/, myBoolean/*append*/);/*Write a text file*/
/* Example: */writeFile(JD_HOME+"/log.txt",JSON.stringify(this)+"\r\n",true);
/* =========  Properties =========*/
//JDownloader Installation Directory;
var myString = JD_HOME;
/* =============== Classes =============== */
/* === Archive === */
/* =========  Methods =========*/
var myBoolean = myArchive.equals(myObject);
var myString = myArchive.getArchiveType();
var myDownloadLink[] = myArchive.getDownloadLinks();
var myString = myArchive.getExtractToFolder();
var myFilePath[] = myArchive.getExtractedFilePaths();
var myString[] = myArchive.getExtractedFiles();
var myString = myArchive.getExtractionLog();
var myString = myArchive.getFolder();
var myObject = myArchive.getInfo();
var myString = myArchive.getName();
var myList = myArchive.getPasswords();
var myString = myArchive.getUsedPassword();
var myInt = myArchive.hashCode();
var myBoolean = myArchive.isPasswordProtected();
myArchive.setPasswords(myList);
/* === Browser === */
/* =========  Methods =========*/
var myBrowser = myBrowser.cloneBrowser();
var myBoolean = myBrowser.equals(myObject);
var myInt = myBrowser.getConnectTimeout();
var myLong = myBrowser.getContentLength();
var myString = myBrowser.getContentType();
var myString = myBrowser.getCookie(myString, myString);
var myBoolean = myBrowser.getDefaultSSLTrustALL();
myBrowser.getDownload(myString, myString);
var myString = myBrowser.getHTML();
var myInt = myBrowser.getLoadLimit();
var myString = myBrowser.getPage(myString);
var myInt = myBrowser.getReadTimeout();
var myString = myBrowser.getRedirectLocation();
var myString = myBrowser.getRequestMethod();
var myLong = myBrowser.getRequestTime();
var myInt = myBrowser.getResponseCode();
var myString = myBrowser.getResponseHeader(myString);
var myString = myBrowser.getURL();
var myInt = myBrowser.hashCode();
var myBoolean = myBrowser.isFollowingRedirects();
var myBoolean = myBrowser.isSSLTrustALL();
var myString = myBrowser.postPage(myString, myString);
myBrowser.setConnectTimeout(myInt);
myBrowser.setCookie(myString, myString, myString);
myBrowser.setDefaultSSLTrustALL(myBoolean);
myBrowser.setFollowRedirects(myBoolean);
myBrowser.setHeader(myString, myString);
myBrowser.setLoadLimit(myInt);
var myBoolean = myBrowser.setProxy(myString);
myBrowser.setReadTimeout(myInt);
/* === ConditionalSkipReason === */
/* =========  Methods =========*/
var myString = myConditionalSkipReason.getClassName();
var myDownloadLink = myConditionalSkipReason.getDownloadLinkCondition();
var myString = myConditionalSkipReason.getMessage();
var myLong = myConditionalSkipReason.getTimeOutLeft();
var myLong = myConditionalSkipReason.getTimeOutTimeStamp();
var myString = myConditionalSkipReason.getWaitingSkipReason();
var myBoolean = myConditionalSkipReason.isConditionReached();
var myBoolean = myConditionalSkipReason.isDownloadLinkCondition();
var myBoolean = myConditionalSkipReason.isTimeOutCondition();
/* === CrawledLink === */
/* The context linkgrabber list link*/
/* =========  Methods =========*/
var myBoolean = myCrawledLink.equals(myObject);
var myLong = myCrawledLink.getAddedDate();
var myArchive = myCrawledLink.getArchive();
var myString = myCrawledLink.getAvailableState();
var myLong = myCrawledLink.getBytesTotal();
var myString = myCrawledLink.getComment();
var myString = myCrawledLink.getContainerURL();
var myString = myCrawledLink.getContentURL();
var myDownloadLink = myCrawledLink.getDownloadLink();
var myString = myCrawledLink.getDownloadPath();
var myString = myCrawledLink.getHost();
var myLinkInfo = myCrawledLink.getLinkInfo();
var myString = myCrawledLink.getName();
var myString = myCrawledLink.getOriginURL();
var myCrawledPackage = myCrawledLink.getPackage();
var myString = myCrawledLink.getPriority();
var myMap = myCrawledLink.getProperties();
var myObject = myCrawledLink.getProperty(myString);
var myString = myCrawledLink.getReferrerURL();
var myObject = myCrawledLink.getSessionProperty(myString);
var myCrawlerJob = myCrawledLink.getSourceJob();
var myString = myCrawledLink.getUUID();
var myString = myCrawledLink.getUrl();
var myInt = myCrawledLink.hashCode();
var myBoolean = myCrawledLink.isEnabled();
var myBoolean = myCrawledLink.remove();
myCrawledLink.setComment(myString);
myCrawledLink.setEnabled(myBoolean);
myCrawledLink.setName(myString/*new Name*/);/*Sets a new filename*/
myCrawledLink.setPriority(myString);
myCrawledLink.setProperty(myString, myObject);
myCrawledLink.setSessionProperty(myString, myObject);
var myString = myCrawledLink.toString();
/* === CrawledPackage === */
/* The context linkgabber list package*/
/* =========  Methods =========*/
var myBoolean = myCrawledPackage.equals(myObject);
var myLong = myCrawledPackage.getAddedDate();
var myArchive[] = myCrawledPackage.getArchives();
var myLong = myCrawledPackage.getBytesTotal();
var myString = myCrawledPackage.getComment();
var myString = myCrawledPackage.getDownloadFolder();
var myCrawledLink[] = myCrawledPackage.getDownloadLinks();
var myString = myCrawledPackage.getName();
var myString = myCrawledPackage.getPriority();
var myString = myCrawledPackage.getUUID();
var myInt = myCrawledPackage.hashCode();
var myBoolean = myCrawledPackage.remove();
myCrawledPackage.setComment(myString);
myCrawledPackage.setDownloadFolder(myString);
myCrawledPackage.setName(myString);
myCrawledPackage.setPriority(myString);
var myString = myCrawledPackage.toString();
/* === CrawlerJob === */
/* =========  Methods =========*/
var myBoolean = myCrawlerJob.equals(myObject);
var myList = myCrawlerJob.getArchivPasswords();
var myString = myCrawlerJob.getOrigin();
var myString = myCrawlerJob.getPassword();
var myString = myCrawlerJob.getSourceUrl();
var myString = myCrawlerJob.getText();
var myString = myCrawlerJob.getUUID();
var myInt = myCrawlerJob.hashCode();
var myBoolean = myCrawlerJob.isAssignJobID();
var myBoolean = myCrawlerJob.isDeepAnalysisEnabled();
myCrawlerJob.setAssignJobID(myBoolean);
myCrawlerJob.setDeepAnalysisEnabled(myBoolean);
myCrawlerJob.setPassword(myString);
myCrawlerJob.setText(myString);
/* === DownloadLink === */
/* The context download list link*/
/* =========  Methods =========*/
myDownloadLink.abort();
var myBoolean = myDownloadLink.equals(myObject);
var myLong = myDownloadLink.getAddedDate();
var myArchive = myDownloadLink.getArchive();
var myLong = myDownloadLink.getBytesLoaded();
var myLong = myDownloadLink.getBytesTotal();
var myString = myDownloadLink.getComment();
var myConditionalSkipReason = myDownloadLink.getConditionalSkipReason();
var myString = myDownloadLink.getContainerURL();
var myString = myDownloadLink.getContentURL();
var myLong = myDownloadLink.getDownloadDuration();
var myString = myDownloadLink.getDownloadHost();
var myString = myDownloadLink.getDownloadPath();
var myLong = myDownloadLink.getDownloadSessionDuration();
var myLong = myDownloadLink.getDownloadTime();
var myLong = myDownloadLink.getEta();
var myString = myDownloadLink.getExtractionStatus();
var myString = myDownloadLink.getFinalLinkStatus();
var myLong = myDownloadLink.getFinishedDate();
var myString = myDownloadLink.getHost();
var myLinkInfo = myDownloadLink.getLinkInfo();
var myString = myDownloadLink.getName();
var myString = myDownloadLink.getOriginURL();
var myFilePackage = myDownloadLink.getPackage();
var myString = myDownloadLink.getPluginURL();
var myString = myDownloadLink.getPriority();
var myMap = myDownloadLink.getProperties();
var myObject = myDownloadLink.getProperty(myString);
var myString = myDownloadLink.getReferrerURL();
var myObject = myDownloadLink.getSessionProperty(myString);
var myString = myDownloadLink.getSkippedReason();
var myLong = myDownloadLink.getSpeed();
var myString = myDownloadLink.getStatus();
var myMap = myDownloadLink.getTempProperties();
var myObject = myDownloadLink.getTempProperty(myString);
var myString = myDownloadLink.getUUID();
var myString = myDownloadLink.getUrl();
var myInt = myDownloadLink.hashCode();
var myBoolean = myDownloadLink.isEnabled();
var myBoolean = myDownloadLink.isFinished();
var myBoolean = myDownloadLink.isResumeable();
var myBoolean = myDownloadLink.isRunning();
var myBoolean = myDownloadLink.isSkipped();
var myBoolean = myDownloadLink.remove();
myDownloadLink.reset();
myDownloadLink.resume();
myDownloadLink.setComment(myString);
myDownloadLink.setEnabled(myBoolean);
myDownloadLink.setName(myString/*new Name*/);/*Sets a new filename*/
myDownloadLink.setPriority(myString);
myDownloadLink.setProperty(myString, myObject);
myDownloadLink.setSessionProperty(myString, myObject);
myDownloadLink.setSkipped(myBoolean);
myDownloadLink.setTempProperty(myString, myObject);
var myString = myDownloadLink.toString();
/* === Environment === */
/* =========  Methods =========*/
var myString = myEnvironment.getARCHFamily();
var myLong = myEnvironment.getJavaVersion();
var myString = myEnvironment.getNewLine();
var myString = myEnvironment.getOS();
var myString = myEnvironment.getOSFamily();
var myString = myEnvironment.getPathSeparator();
var myBoolean = myEnvironment.is64BitArch();
var myBoolean = myEnvironment.is64BitJava();
var myBoolean = myEnvironment.is64BitOS();
var myBoolean = myEnvironment.isBSD();
var myBoolean = myEnvironment.isHeadless();
var myBoolean = myEnvironment.isLinux();
var myBoolean = myEnvironment.isMac();
var myBoolean = myEnvironment.isWindows();
/* === FilePackage === */
/* The context download list package*/
/* =========  Methods =========*/
var myBoolean = myFilePackage.equals(myObject);
var myLong = myFilePackage.getAddedDate();
var myArchive[] = myFilePackage.getArchives();
var myLong = myFilePackage.getBytesLoaded();
var myLong = myFilePackage.getBytesTotal();
var myString = myFilePackage.getComment();
var myString = myFilePackage.getDownloadFolder();
var myDownloadLink[] = myFilePackage.getDownloadLinks();
var myLong = myFilePackage.getFinishedDate();
var myString = myFilePackage.getName();
var myString = myFilePackage.getPriority();
var myMap = myFilePackage.getProperties();
var myObject = myFilePackage.getProperty(myString);
var myString = myFilePackage.getUUID();
var myInt = myFilePackage.hashCode();
var myBoolean = myFilePackage.isFinished();
var myBoolean = myFilePackage.remove();
myFilePackage.setComment(myString);
myFilePackage.setDownloadFolder(myString);
myFilePackage.setName(myString);
myFilePackage.setPriority(myString);
myFilePackage.setProperty(myString, myObject);
var myString = myFilePackage.toString();
/* === FilePath === */
/* =========  Methods =========*/
var myBoolean = myFilePath.copyTo(myString);
var myBoolean = myFilePath.copyTo(myString, myString, myBoolean);
var myBoolean = myFilePath.delete();
var myBoolean = myFilePath.deleteRecursive();
var myBoolean = myFilePath.equals(myObject);
var myBoolean = myFilePath.exists();
var myString = myFilePath.getAbsolutePath();
var myFilePath[] = myFilePath.getChildren();
var myLong = myFilePath.getCreatedDate();
var myString = myFilePath.getExtension();
var myLinkInfo = myFilePath.getLinkInfo();
var myLong = myFilePath.getModifiedDate();
var myString = myFilePath.getName();
var myFilePath = myFilePath.getParent();
var myString = myFilePath.getPath();
var myLong = myFilePath.getSize();
var myInt = myFilePath.hashCode();
var myBoolean = myFilePath.isDirectory();
var myBoolean = myFilePath.isFile();
var myBoolean = myFilePath.mkdirs();
var myBoolean = myFilePath.moveTo(myString);
var myFilePath = myFilePath.rename(myString);
var myFilePath = myFilePath.renameName(myString);
var myFilePath = myFilePath.renamePath(myString);
var myBoolean = myFilePath.renameTo(myString);
var myString = myFilePath.toString();
/* === LinkInfo === */
/* =========  Methods =========*/
var myString = myLinkInfo.getDesc();
var myString = myLinkInfo.getGroup();
var myInt = myLinkInfo.getPartNum();
var myString = myLinkInfo.name();

// This Event will never be triggered.
Reply With Quote
  #1502  
Old 17.08.2020, 14:54
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by woriamu View Post
Sorry for the late response, but this isn't working and I'm not sure why. Also, I'm not sure if this is important but under line 350 of the script editor help tab it says that this event will never be triggered ...
Script will 'never be triggered' if trigger has not been selected (Default trigger is None). Use the trigger specified in the script.
Reply With Quote
  #1503  
Old 18.08.2020, 03:14
woriamu woriamu is offline
Junior Loader
 
Join Date: Jun 2020
Posts: 12
Default

Quote:
Originally Posted by mgpai View Post
Script will 'never be triggered' if trigger has not been selected (Default trigger is None). Use the trigger specified in the script.
I've been using the specified trigger and it hasn't been working

I'm not sure why but it says that for the default trigger (None) and the specified trigger (Jdownloader started). Every other trigger changes the last few lines to something else it seems.
Reply With Quote
  #1504  
Old 18.08.2020, 07:52
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by woriamu View Post
I've been using the specified trigger and it hasn't been working ...
Although the script help wrongly displays "This Event will never be triggered" for the "JDownloader started" trigger, the script is executed on JD start as expected and working fine.

Please post a screenshot of the script you are using and your eventscripter main panel (which lists the scritpts) or find me in IRC:

Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader
Reply With Quote
  #1505  
Old 18.08.2020, 14:21
Dockel Dockel is offline
JD Legend
 
Join Date: Feb 2020
Posts: 664
Default Play sound - only if need be - after a single download is downloaded

It would be good, if one could activate (quickly, easily by 1, 2 clicks or in the context menu or so) a sound to be played when a special download is downloaded completely (for instance to manually do something then). Only for a single download (not for the others) if need be.

First request:
https://board.jdownloader.org/showth...434#post470434
__________________
Aktuelles Windows
Reply With Quote
  #1506  
Old 18.08.2020, 21:42
woriamu woriamu is offline
Junior Loader
 
Join Date: Jun 2020
Posts: 12
Default

Quote:
Originally Posted by mgpai View Post
Although the script help wrongly displays "This Event will never be triggered" for the "JDownloader started" trigger, the script is executed on JD start as expected and working fine.

Please post a screenshot of the script you are using and your eventscripter main panel (which lists the scritpts) or find me in IRC:

Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader
https://i.imgur.com/DtsLSkg.png
https://i.imgur.com/Weinftk.png

And here's a package that has links that weren't reset - https://i.imgur.com/vLtn0s1.png
Reply With Quote
  #1507  
Old 18.08.2020, 22:21
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by woriamu View Post
.. And here's a package that has links that weren't reset ...
Your setup seems fine. I can only assume the data which is returned by the script might be different than that of what is displayed in the GUI. Find me in JD Chat when you are free and have such links in the list.
Reply With Quote
  #1508  
Old 18.08.2020, 22:56
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by Dockel View Post
... sound to be played when a special download is downloaded completely ...
Toggle sound notification for selected (single) link/package (common script for download/linkgrabber tab):
Code:
//Toggle sound notification
//Trigger : Downloadlist Contextmenu Button Pressed AND/OR Linkgrabber Contextmenu Button Pressed
//Customize context menu > Create a new "Eventscripter trigger" button > Rename it to "Toggle sound notification" > Change Icon (optional)

if (name == "Toggle sound notification") {
    var dlSelection, lgSelection;
    var selection = dlSelection || lgSelection;

    if (selection) {
        var obj = selection.getContextPackage() || selection.getContextLink();
        var comment = obj.comment || "";
        var myComment = selection.isPackageContext() ? "#playsoundwhenpackagefinished#" : "#playsoundwhenlinkfinished#";

        if (comment.indexOf(myComment) > -1) {
            obj.comment = comment.replace(myComment, "");
        } else {
            obj.comment = myComment + comment;
        }
    }
}

Play sound notification for marked link/package:
Code:
//Play sound when download finished
//Trigger: A Download Stopped

var notify, myWavFile = JD_HOME + "/themes/standard/org/jdownloader/sounds/captcha.wav"; // <- Specify path to 'wav' file

if (link.finished) {
    var comment = link.comment || "";
    var myComment = "#playsoundwhenlinkfinished#";

    if (comment.indexOf(myComment) > -1) {
        link.comment = comment.replace(myComment, "");
        notify = true;
    }
}

if (package.finished) {
    var comment = package.comment || "";
    var myComment = "#playsoundwhenpackagefinished#";

    if (comment.indexOf(myComment) > -1) {
        package.comment = comment.replace(myComment, "");
        notify = true;
    }
}

if (notify) {
    playWavAudio(myWavFile);
}

Last edited by mgpai; 24.08.2020 at 13:10. Reason: Fixed incorrect context menu item name case in script comment
Reply With Quote
  #1509  
Old 18.08.2020, 23:32
Dockel Dockel is offline
JD Legend
 
Join Date: Feb 2020
Posts: 664
Default

Wow, that was very fast! Thank you very much!

Sorry, I made some mistake, cannot get it to work:



The context menu in the Download window:








__________________
Aktuelles Windows
Reply With Quote
  #1510  
Old 18.08.2020, 23:37
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by Dockel View Post
... cannot get it to work ...
Realised error handling was missing from the second script only after I had posted it and fixed it soon after (before your post). Please try the modified script.
Reply With Quote
  #1511  
Old 19.08.2020, 00:03
Dockel Dockel is offline
JD Legend
 
Join Date: Feb 2020
Posts: 664
Default

Ah, yes, now it works, great! Many thanks!

It appears not to work when I mark a folder to play a sound for all the downloads in the folder:


and when I select a download in the link grabber to play a sound:


So I have to mark the downloads itselfes in the download window always?

It seems pressing the play a sound item in the menu twice does not deactivate the sound? Respectively can one see whether the sound is activated or not? Or deactivate it?

And is it possible to distinguish the download sound from the captcha sound? E.g. play it backwards (order of the tones from highest to lowest) or the first tone three times or the first one one time, the last twice or so?
__________________
Aktuelles Windows

Last edited by Dockel; 19.08.2020 at 08:58.
Reply With Quote
  #1512  
Old 19.08.2020, 11:18
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,918
Default

Quote:
Originally Posted by Dockel View Post
And is it possible to distinguish the download sound from the captcha sound? E.g. play it backwards (order of the tones from highest to lowest) or the first tone three times or the first one one time, the last twice or so?
Just use another sound file for that - as you can see the script contains the path to the file which will be played
He just picked the captcha sound because this already comes located in the JD folder.

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #1513  
Old 19.08.2020, 11:20
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

I have rewritten the scripts in post #1508

Quote:
Originally Posted by Dockel View Post
It appears not to work when I mark a folder to play a sound for all the downloads in the folder ...
You can now also mark folders.

Quote:
... and when I select a download in the link grabber to play a sound ... So I have to mark the downloads itselfes in the download window always?
You can mark the link/package in download or linkgrabber tab. (Same script for both context menu triggers).

Quote:
It seems pressing the play a sound item in the menu twice does not deactivate the sound?
Script will now toggle the comment to enable/disable sound notification.

Quote:
Respectively can one see whether the sound is activated or not? Or deactivate it?
  • You can view/edit the comment in link/package properties panel.
  • You can use the search filter to filter the links by comment.
Quote:
And is it possible to distinguish the download sound from the captcha sound?
The script uses the sound file which is available by default in JD. You can use your own sound file (wav format) by changing the path to the "myWavFile" in the script. For e.g. replace:

Code:
JD_HOME + "/themes/standard/org/jdownloader/sounds/captcha.wav"

with:
Code:
"c:/audio files/my sound file.wav"

If you need any help configuring the script, feel free to find me in chat.
Reply With Quote
  #1514  
Old 19.08.2020, 11:58
Dockel Dockel is offline
JD Legend
 
Join Date: Feb 2020
Posts: 664
Default

Quote:
Just use another sound file for that - as you can see the script contains the path to the file which will be played
Alright. But I cannot get it working with such (an error message appears):

Code:
//Play sound when download finished
//Trigger: A Download Stopped

if (link.finished) {
    var myComment = "#playsoundwhenfinished#";
    //var myWavFile = JD_HOME + "/themes/standard/org/jdownloader/sounds/captcha.wav"; 
    var myWavFile = JD_HOME + "I:\Eigene Dateien\Sounds - Audio\Klänge\CONGRATS.WAV"; 
    var comment = link.comment || "";

    if (comment.indexOf(myComment) > -1) {
        playWavAudio(myWavFile);
        link.comment = comment.replace(myComment, "");
    }
}
Thank you very much for the rewritten scripts!

Quote:
//Trigger : Downloadlist Contextmenu Button Pressed AND/OR Linkgrabber Contextmenu Button Pressed
How can I use both of them at the same time? Add the same script twice?

Sorry, I guess, I made a mistake, no sound.









Quote:
If you need any help configuring the script, feel free to find me in chat.
Thank you very much!
__________________
Aktuelles Windows

Last edited by Dockel; 19.08.2020 at 12:02.
Reply With Quote
  #1515  
Old 19.08.2020, 12:13
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by Dockel View Post
... I cannot get it working with such (an error message appears)...
Do not use old scripts. The new script uses different comments for link and packages, since you wanted to also set sound only for package. Remove old scripts and context menu items and only use the new ones.
  • new comment used for link: #playsoundwhenlinkfinished#
  • new comment for used package: #playsoundwhenpackagefinished#

Format to set custom sound:

Code:
var myWavFile = "I:\\Eigene Dateien\\Sounds - Audio\\Klänge\\CONGRATS.WAV";

Quote:
How can I both of them at the same time?
Not at the same time. You have to add the same script twice and create menu items in both context menus. Once with 'downloadlist contextmenu button pressed' trigger and once with "linkgrabber contextmenu button pressed' trigger.
Reply With Quote
  #1516  
Old 19.08.2020, 13:54
Dockel Dockel is offline
JD Legend
 
Join Date: Feb 2020
Posts: 664
Default

Quote:
Do not use old scripts. The new script uses different comments for link and packages, since you wanted to also set sound only for package. Remove old scripts and context menu items and only use the new ones.
Yes, I understand. Actually that would not be intended, I use the scripts from the link you gave me, here: https://board.jdownloader.org/showpo...postcount=1508
And I do not use the old menu items when trying the new scripts.

Sorry, do not know what I am missing. I cannot find any difference between the scripts I use the ones here: https://board.jdownloader.org/showpo...postcount=1508

Quote:
new comment used for link: #playsoundwhenlinkfinished#
new comment for used package: #playsoundwhenpackagefinished#
Yes, they are in the new scripts. I have to add this somewhere? Sorry, where?

Quote:
Format to set custom sound:
Thank you, for testing I left that unchanged, but no sound anyway.

Quote:
Not at the same time. You have to add the same script twice and create menu items in both context menus. Once with 'downloadlist contextmenu button pressed' trigger and once with "linkgrabber contextmenu button pressed' trigger.
It is added twice:


Sorry again, I cannot get it to work.
__________________
Aktuelles Windows
Reply With Quote
  #1517  
Old 19.08.2020, 14:06
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by Dockel View Post
Yes, they are in the new scripts. I have to add this somewhere? Sorry, where?
The strings will be automatically added to the selected link/package comment when using the context menu item.

You can type the string in the bottom toolbar search field to find links for which sound notification has been enabled.

Check the link/comment field in properties panel to see if the sound notification has been enabled. If it still doesn't work, find me in JD chat.
Reply With Quote
  #1518  
Old 19.08.2020, 14:17
Dockel Dockel is offline
JD Legend
 
Join Date: Feb 2020
Posts: 664
Default

Quote:
You can type the string in the bottom toolbar search field to find links for which sound notification has been enabled.
Nothing found.

Quote:
Check the link/comment field in properties panel to see if the sound notification has been enabled.
Nothing there.

Quote:
Check the link/comment field in properties panel to see if the sound notification has been enabled. If it still doesn't work, find me in JD chat.
OK, thank you, I will do so, but I am afraid I cannot make it before Monday, I hope on Monday or Tuesday I will make it, I still have too much to do. Hope, that is OK.
__________________
Aktuelles Windows
Reply With Quote
  #1519  
Old 19.08.2020, 14:19
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,918
Default

Quote:
Originally Posted by Dockel View Post
OK, thank you, I will do so, but I am afraid I cannot make it before Monday, I hope on Monday or Tuesday I will make it, I still have too much to do. Hope, that is OK.
Hm you've found all the time to respond here ... just as a hint - our chat is here:
jdownloader.org/knowledge/chat

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #1520  
Old 19.08.2020, 14:20
Dockel Dockel is offline
JD Legend
 
Join Date: Feb 2020
Posts: 664
Default

Alright, thank you very much!
__________________
Aktuelles Windows
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 17:27.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.