JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #2441  
Old 30.09.2022, 16:52
MKey MKey is offline
Baby Loader
 
Join Date: Apr 2022
Posts: 6
Default

Thank you for the very quick response and sorry for my mistake with the topic.
I'm still very bad at navigating the forum.
Reply With Quote
  #2442  
Old 01.10.2022, 02:17
oni- oni- is offline
Baby Loader
 
Join Date: Feb 2021
Posts: 5
Default

Quote:
Originally Posted by Jiaz View Post
@oni-: Thanks for the script. I will take a look at it. can you send me your altered deep pattern to support@jdownloader.org?
hi Jiaz,
did u get a chance to look into it?
Reply With Quote
  #2443  
Old 01.10.2022, 19:59
DaDealer's Avatar
DaDealer DaDealer is offline
JD Adviser
 
Join Date: Oct 2017
Posts: 112
Default

Hi. I'm looking for a script that will reconnect when Downloadspeed is under 1Mib/s and the Hoster is 1fichier.
Reply With Quote
  #2444  
Old 02.10.2022, 11:05
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 78,501
Default

@DaDealer: you should only do request when using no account as too many reconnect/IP changes might get your premium account getting blocked. there is a script here that does restart downloads when speed falls below xy. you should try that first and/or can modify it to request reconnect.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2445  
Old 02.10.2022, 11:05
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 78,501
Default

Quote:
Originally Posted by oni- View Post
hi Jiaz,
did u get a chance to look into it?
Sorry, forgotten about that, will do it
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2446  
Old 02.10.2022, 11:53
DaDealer's Avatar
DaDealer DaDealer is offline
JD Adviser
 
Join Date: Oct 2017
Posts: 112
Default

Quote:
Originally Posted by Jiaz View Post
@DaDealer: you should only do request when using no account as too many reconnect/IP changes might get your premium account getting blocked. there is a script here that does restart downloads when speed falls below xy. you should try that first and/or can modify it to request reconnect.
I'm using no Premium. I switch between Countrys, but sometimes the Speed drops down to 250kb.
I just found a script and try to adapt it.

Last edited by DaDealer; 02.10.2022 at 21:14.
Reply With Quote
  #2447  
Old 02.10.2022, 13:09
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 78,501
Default

@DaDealer: search/look for the *restart Download on slow speed* script and then try to modify it to reconnect instead. maybe even an auto reconnect script on slow speed already exists.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2448  
Old 02.10.2022, 13:42
DaDealer's Avatar
DaDealer DaDealer is offline
JD Adviser
 
Join Date: Oct 2017
Posts: 112
Default

Quote:
Originally Posted by Jiaz View Post
@DaDealer: search/look for the *restart Download on slow speed* script and then try to modify it to reconnect instead. maybe even an auto reconnect script on slow speed already exists.
If I was able to find the right script and api call I would not ask for help. But thank you
Reply With Quote
  #2449  
Old 03.10.2022, 10:34
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 78,501
Default

@DaDealer: 30 seconds search, two results
https://board.jdownloader.org/showpo...4&postcount=35
https://board.jdownloader.org/showth...ipt#post495272
instead of restart download, modify it to request a reconnect. Please try for yourself first as I also have to dig through forum myself. I'm not a script master like mgpai is
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2450  
Old 03.10.2022, 17:57
DaDealer's Avatar
DaDealer DaDealer is offline
JD Adviser
 
Join Date: Oct 2017
Posts: 112
Default

Quote:
Originally Posted by Jiaz View Post
@DaDealer: 30 seconds search, two results
**External links are only visible to Support Staff**...
**External links are only visible to Support Staff**...
instead of restart download, modify it to request a reconnect. Please try for yourself first as I also have to dig through forum myself. I'm not a script master like mgpai is
Again. Thank you. I just found a Script and was able to modify it by myself yesterday
Reply With Quote
  #2451  
Old 03.10.2022, 22:01
gelse gelse is offline
Baby Loader
 
Join Date: Jun 2010
Posts: 6
Default

Kann mir jemand einen tip geben, wie ich die notifications an einen MQTT server weiterleiten kann? (was übrigens ein echt geiles feature für jdownloader selbst wäre).
Soweit ich weiss, ist das mal mit nativem javascript nicht trivial. Ich hab aber von javascript nicht wirklich eine Ahnung (python, C#, bash schon ein paar Jahrzehnte, aber JS ist an mir vorüber gegangen).

übrigens - nicht zusammenklickbar, da mein JDownloader headless läuft.

Jetzt wäre meine Idee, das ganze zB über einen apprise server mit WebHooks laufen zu lassen - das müsste ja eigentlich machbar sein. Allerdings ... wie gesagt ... JavaScript und ich stehen etwas auf Kriegsfuß, kann mich wer in die richtige Richtung schubsen ?
Reply With Quote
  #2452  
Old 04.10.2022, 10:46
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 78,501
Default

Quote:
Originally Posted by DaDealer View Post
Again. Thank you. I just found a Script and was able to modify it by myself yesterday
Maybe you would like to share it here? so ohers can use it or use it as template for own scripts?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2453  
Old 04.10.2022, 11:37
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 78,501
Default

@gelse: Also das einfachste wäre wenn du irgendwo einen HTTP Rest Endpoint hast, dann kannst du alles mögliche via Skripte dorthin puschen lassen, auch Events.
Quote:
Originally Posted by gelse View Post
übrigens - nicht zusammenklickbar, da mein JDownloader headless läuft.
Wir empfehlen eh erst das Skript an einem JDownloader mit GUI zu entwickeln/testen und erst das fertige Skript dann auf den headless JDownloader zu kopieren
Hier ein Beispiel wie man einen Post Request absetzen kann, https://board.jdownloader.org/showpo...postcount=2156
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 04.10.2022 at 12:10.
Reply With Quote
  #2454  
Old 04.10.2022, 18:53
jaydeeownluder jaydeeownluder is offline
JD Addict
 
Join Date: Dec 2010
Location: kölle
Posts: 162
Default

Quote:
Originally Posted by Jiaz View Post
@jaydeeownluder: The script does basic string sorting and not on the actual number, that's why sorting doesn't work as intended. The error happens because the script doesn't check if status is set/available or undefined. For proper sorting you would need to parse the number from string and then sort on it. I will try to fix the error any try my luck on sorting
Thank you! Did you have had luck? ;-D
I'm out of knowledge here.
Until now, beside the error, the script does the same as clicking once on the column "status".
Reply With Quote
  #2455  
Old 04.10.2022, 19:27
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 78,501
Default

Quote:
Originally Posted by oni- View Post
hi Jiaz,
did u get a chance to look into it?
found the cause and should be working fine again with next core update thanks for this bugreport. the xml feed was treated as downloadable file by accident.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2456  
Old 05.10.2022, 15:08
BeRa BeRa is offline
Modem User
 
Join Date: May 2020
Posts: 1
Default

Quote:
Originally Posted by mgpai View Post
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;
}
Hello how to check if this script is still working? i'm not sure if i set it up correctly.
**External links are only visible to Support Staff**
Reply With Quote
  #2457  
Old 05.10.2022, 20:18
gelse gelse is offline
Baby Loader
 
Join Date: Jun 2010
Posts: 6
Default

@Jiaz

Quote:
Originally Posted by Jiaz View Post
@gelse: Also das einfachste wäre wenn du irgendwo einen HTTP Rest Endpoint hast, dann kannst du alles mögliche via Skripte dorthin puschen lassen, auch Events.

Wir empfehlen eh erst das Skript an einem JDownloader mit GUI zu entwickeln/testen und erst das fertige Skript dann auf den headless JDownloader zu kopieren
Hier ein Beispiel wie man einen Post Request absetzen kann, **External links are only visible to Support Staff**...
ok - also die methode postPage
der erste parameter ist die url
der zweite teil sind die form parameter, URL codiert, nehme ich an ?
kann man irgendwie headerdaten setzen (für authentication) ?

wenn es eine Doku gibt auf die du mich verweisen kannst, würd das echt viel helfen - der sourcecode reicht auch schon. code kann ich lesen. ;-)

Danke auf jeden Fall, hilft mir schon viel weiter!
Reply With Quote
  #2458  
Old 06.10.2022, 10:54
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 78,501
Default

Quote:
Originally Posted by gelse View Post
wenn es eine Doku gibt auf die du mich verweisen kannst, würd das echt viel helfen - der sourcecode reicht auch schon. code kann ich lesen. ;-)
Hol dir den JDownloader mit einer GUI und im Eventscripter siehst du über dem Editor alle verfügbaren Objekte und Befehle (mehr oder weniger schlecht erklärt ) passend zum aktuellen Trigger, zb
Quote:
/* === Browser === */
/* ========= Methods =========*/
var myBrowser = myBrowser.cloneBrowser();
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 myMap = myBrowser.getResponseHeaders();
var myString = myBrowser.getURL();
var myString = myBrowser.headPage(myString);
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);
Quote:
Originally Posted by gelse View Post
kann man irgendwie headerdaten setzen (für authentication) ?
hab den Befehl hervorgehoben
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 06.10.2022 at 10:56.
Reply With Quote
  #2459  
Old 06.10.2022, 11:06
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 78,501
Default

@jaydeeownluder: I've fixed the error in original script and your post, see
Quote:
return package.status && package.status.indexOf(filter) > -1;
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2460  
Old 06.10.2022, 14:48
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 64,016
Default

Quote:
Originally Posted by Jiaz View Post
@jaydeeownluder: I've fixed the error in original script and your post, see
@jaydeeownluder

Bedenke, dass das nur den Fehler behebt der kommt, wenn es nichts zu sortieren gibt.

Die Sortierung selbst wird erst richtig funktionieren, sobald richtiges Parsing der Dateigrölßen im Script eingebaut ist!
Eventuell funktioiniert es auch, wie schon in deinem Eingangsthread beschrieben, wenn du in JD die Profieinstellung "GraphicalUserInterfaceSettings.maxsizeunit" auf "B" setzt (hier schonmal erklärt).
Bedenke, dass du die Dateigrößenangaben dann halt ggf. selbst nicht mehr lesen kannst.
__________________
JD Supporter, Plugin Dev. & Community Manager
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?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
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 18:21.
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 - 2022, Jelsoft Enterprises Ltd.