JDownloader Community - Appwork GmbH
 

Go Back   JDownloader Community - Appwork GmbH > Deutscher Support > Allgemeine Diskussion
Reply
 
Thread Tools Display Modes
  #1  
Old 14.08.2017, 05:34
Pfurz
Guest
 
Posts: n/a
Question Automatisches Stoppen und erneutes Starten der Downloads bei niedrigem Downloadspeed

jdownloader v2 (Sun Aug 13 18:07:53 CEST 2017)
Premaccount: Share-online.biz

hi,

ich habe hier öfters das Problem, dass der gesamte Downloadspeed von allen Downloads in den Bereich unter 20kb/s fällt...:outch:

Das Speed-Problem kann behoben werden, indem ich die Downloads stoppe und die Downloads dann direkt wieder neu starte...

Gibt es eventuell ein Skript oder Plugin mit welchem man den Stop/Neustart-Vorgang automatisieren kann?

skriptbeispiel:

if speed < 20kb then stop & restart downloads
Reply With Quote
  #2  
Old 14.08.2017, 14:55
Pfurz
Guest
 
Posts: n/a
Smile Erledigt!

Hab mir selbst ein Skript für die Erweiterung "Ereignis-Skripter" geschrieben:

Code:
var Count = 0;

if (isDownloadControllerRunning() == true) {

    if (isDownloadControllerStopping() == false) {

        if (getTotalSpeed() < 100000) {

            stopDownloads();
            while (isDownloadControllerStopping() == true) {
                sleep(500);
                Count++;
                if (Count > 20) {
                    break;
                }
            }

            sleep(2000);

            for (i = 0; i < 10; i++) {

                startDownloads();
                while (isDownloadControllerRunning() == false) {
                    sleep(500);
                    Count++;
                    if (Count > 20) {
                        break;
                    }
                }
                if (Count < 21) {
                    break;
                }
            }
        }
    }
}
Bei einem Totalspeed von unter 100.000 Bytes werden die Downloads gestoppt und nach 2 Sekunden wieder neu gestartet.

Eventuell kann der ein oder andere das Skript ja gebrauchen...

Last edited by Pfurz; 15.08.2017 at 01:16. Reason: Script optimiert
Reply With Quote
  #3  
Old 14.08.2017, 17:08
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,563
Default

Danke fürs Bereitstellen des Scripts
__________________
JD-Dev & Server-Admin
Reply With Quote
  #4  
Old 16.08.2017, 18:14
Lucaen Lucaen is offline
JD Addict
 
Join Date: Aug 2009
Posts: 161
Default

Ich teste das mal.
Was soll ich bei Trigger einstellen?
Soll ein Häkchen bei Synchronous execution of script rein?

getTotalSpeed hab ich besser mal auf 1000000 gestellt

Irgendwie müsste da auch noch rein das das nur bei Share-online.biz macht.
Reply With Quote
  #5  
Old 17.08.2017, 12:06
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,563
Default

Nur bei Anbieter XY ist etwas komplizierter, da du ja nur die Geschwindigkeiten bestimmter Downloads anschauen musst und dennoch die gesamte Geschwindigkeit im Auge halten musst. Sonst hast du Anbieter A mit 90% Speed und Anbieter B mit 10% und startest immer wieder neu weil A schneller ist, aber B überwacht wird.
Bei allen Eventscripterangelegenheiten, einfach mal mgpai fragen
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply


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 16:29.
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.