#441
|
|||
|
|||
![]()
That's no good. On Mega.co you always download at great speed but, rarely, there are files that are downloaded only at low speeds. These files, of course, remain last in the list in queue. So it often happens to have 2 or 3 files that are downloading at 100kb each. In this situation, the mgpai script would continue indefinitely to disconnect and reconnect and damage the router. So, I do not want to limit the reconnections, I want to limit them only when a similar situation is created.
I need a script that, in a situation like the one I described, disconnects and reconnects 10 times and then stops and goes on to download at low speed because even with the reconnection does not change anything Last edited by FlyAway; 19.04.2018 at 10:31. |
#442
|
||||
|
||||
![]()
What makes you think that reconnect damages your router? I'm not aware of any hardware issues nor ever heard/read about a router got broken because of too many reconnects/restarts.
You can easily *detect* those situations in the script and avoid reconnect. For example add special handling to detect mega downloads. I don't see any difference between limiting number of executions and limits reconnects
__________________
JD-Dev & Server-Admin |
#443
|
|||
|
|||
![]()
Try turning off and on a light for 2 or 3 hours continuously and then we talk about it
![]() Mega.co normally download at high speeds, only some files (I do not understand why) are downloaded slowly and even the reconnection does not bring improvements. If you set maximum 2 reconnections in 2 hours, you prevent me from restarting the router even when I still have files in the queue that would be downloaded quickly Last edited by FlyAway; 19.04.2018 at 11:19. |
#444
|
|||
|
|||
![]()
OMG... it took me now over an hour to find out:
"package" is not available with the trigger "ON_ARCHIVE_EXTRACTED" this brings some questions up: 1) WHY ? maybe because the package gets deleted after extraction (in my case) ? 2) where do i find a list of all triggers names in JSON format ? 3) is it possible to run multiple scripts on the same event ? 4) what is the correct docu for all this ? my.jdownloader.org/developers/ ?? where do i find the info that there is something like "package" and that it has a function called getName() ?? thanks |
#445
|
||||
|
||||
![]()
@michabbb:
1.) Several reasons! -For example the archive parts can be spread among several packages -Archives can also have no links/packages at all! For example manual extraction via GUI or deep extraction of inner archives. -You can use getDownloadLinks() and check for existiance and then use getPackage() 2.) ON_DOWNLOAD_CONTROLLER_START , ON_DOWNLOAD_CONTROLLER_STOPPED, ON_PACKAGE_FINISHED, ON_GENERIC_EXTRACTION, ON_ARCHIVE_EXTRACTED, ON_JDOWNLOADER_STARTED , ON_OUTGOING_REMOTE_API_EVENT, ON_NEW_FILE , ON_NEW_CRAWLER_JOB , ON_PACKAGIZER , ON_DOWNLOADS_PAUSE , ON_DOWNLOADS_RUNNING , ON_DOWNLOADS_STOPPED , RECONNECT_BEFORE , RECONNECT_AFTER , CAPTCHA_CHALLENGE_AFTER , INTERVAL , TOOLBAR_BUTTON , MAIN_MENU_BUTTON , DOWNLOAD_TABLE_CONTEXT_MENU_BUTTON , LINKGRABBER_TABLE_CONTEXT_MENU_BUTTON , DOWNLOAD_TABLE_BOTTOM_BAR_BUTTON , LINKGRABBER_BOTTOM_BAR_BUTTON , TRAY_BUTTON 3.) Just add multiple scripts for the same event or put all javascript into the same event 4.) The scripteditor in JDownloader with GUI shows full doc, all available methods/objects/variables
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 20.04.2018 at 09:33. |
#446
|
|||
|
|||
![]()
will try, thanks a lot !!
|
#447
|
||||
|
||||
![]()
You're welcome. Nothing to thank me for
__________________
JD-Dev & Server-Admin |
#448
|
|||
|
|||
![]()
hi dear friend
i have a question how to set limit daily download from a host? for example: i want set limit daily 30GB download for links from "www.dl-vip.com" what should i do? |
#449
|
|||
|
|||
![]()
excuse me, does this come from the script?
|
#450
|
||||
|
||||
![]()
@Takhen: Yes, there is an error in one of your scripts
__________________
JD-Dev & Server-Admin |
#451
|
|||
|
|||
![]() Quote:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/peymanch.js Note: It might not be possible to accurately determine the exact amount of data downloaded in a day from a particular host, using the script. It will just add the bytes of the downloads finished on the given date and also bytes from pending downloads from the host, which have been partially downloaded. Last edited by mgpai; 27.04.2018 at 11:07. Reason: Added note. |
#452
|
|||
|
|||
![]() Quote:
when run script this give error "ReferenceError: interval is not defined. (#9)" Last edited by peymanch; 27.04.2018 at 12:12. |
#453
|
|||
|
|||
![]()
In the Event Scripter main panel, select "Interval" as trigger, then open the script editor and the set the interval value as per instructions given in the script.
|
#454
|
|||
|
|||
![]()
The only script I have is the one I required (next quote). Could we do something?
|
#455
|
|||
|
|||
![]()
The script seems to be working fine. If you are getting the error only when testing it (clicking 'Test Run' in editor), that error will be be fixed with next update. If you are getting error with live data, please post more details about it or contact me in JD Chat. I will be available there for the next 2-3 hours.
|
#456
|
|||
|
|||
![]() Quote:
Quote:
but when downloaded from myhost as dailylimit didnot stop download! Code:
var dailyLimit = 0.001; // <- Set daily limit in GiB var myHost = "dl-vip.com"; // <- Set JD plugin (host) name interval = 300000; (function() { if (interval < 60000) return; if (!getRunningDownloadLinks().length) return; var bytesLoaded = 0; getAllDownloadLinks().forEach(function(link) { if (link.getHost() != myHost) return; var finishedToday = new Date(link.getFinishedDate()).setHours(0, 0, 0, 0) == new Date().setHours(0, 0, 0, 0); var partiallyLoaded = !link.isFinished() && link.getBytesLoaded() > 0; if (finishedToday || partiallyLoaded) bytesLoaded += link.getBytesLoaded(); }); if (bytesLoaded / (1024 * 1024 * 1024) >= dailyLimit) skipHost(); function skipHost() { getAllDownloadLinks().forEach(function(link) { if (!link.isFinished() && link.getHost() == myHost && !link.isSkipped()) link.setSkipped(true); }); } })(); Last edited by peymanch; 27.04.2018 at 18:34. |
#457
|
|||
|
|||
![]()
excuse me sir i have another request
i want if my site that get url links from that is "**External links are only visible to Support Staff** then get part of site links in filename for example: my site is: "**External links are only visible to Support Staff** and my url link is: "**External links are only visible to Support Staff** i want my filename changes from thanks for help Last edited by raztoki; 28.04.2018 at 01:08. |
#458
|
||||
|
||||
![]()
@peymanch
the filename is determined by the filename in the URL structure, this is a JD core function. If you want something different you will need to manually name it yourself via JD GUI or use placeholders within the url #fname #package or and scan for it with package customiser rules. raztoki
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#459
|
|||
|
|||
![]() Quote:
|
#460
|
|||
|
|||
![]()
The string you want to append to the path/filename is in the source (site) url. So you should be able to add it to the path/filename using packagizer. Check the forum for examples of packagizer rules.
Current script works only if the host has a dedicated plugin in JD. Jiaz has added a new method which returns download host for unsupported sites, but it will be only available after core update. I have added a workaround to the script. You can update and use it till the new method is available. Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/peymanch.js |
![]() |
Thread Tools | |
Display Modes | |
|
|