#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
|
|||
|
|||
When it says: "package" is not defined.
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 |
#461
|
||||
|
||||
@mgpai: the new method is available. you can rewrite the script to use it
__________________
JD-Dev & Server-Admin |
#462
|
|||
|
|||
I couldn't find anything in the list. I also tried link.getDownloadHost() just now and got:
Code:
net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: Cannot find function getDownloadHost in object DownloadLink Instance: sample.txt. (#3) |
#463
|
||||
|
||||
Will be added with next full build in about 10 mins
__________________
JD-Dev & Server-Admin |
#464
|
|||
|
|||
I am looking for an opportunity to send an email whenever JD has finished a download or extraction task and I was told, that this could possibly be solved with the help of the event scripter and of course with the help of mgpai ;-)
JD is running on my Synology NAS and as the NAS itself is able to send mails, maybe there is also a way to persuade JD to do so as well. Unfortunately I have absolutely no knowledge of scripting and/or Linux, so any help will be appreciated. |
#465
|
|||
|
|||
It is possible to use external programs in script to send emails from JD. Unfortunately I have no experience with Linux/NAS. If you know (or can find out) the command which is used to send messages via terminal, I might be able to help you with the script. Else, a third-party program can be used in the script to send the emails.
|
#466
|
||||
|
||||
@mgpai: see mkleine.de/blog/2016/01/07/synology-sendmail-per-shell-aktivieren/ for commandline
__________________
JD-Dev & Server-Admin |
#467
|
|||
|
|||
Quote:
I can always provide a solution using (free) 3rd party software which can also be used in Linux. |
#468
|
||||
|
||||
no need to test yourself, in the end it's a script that calls local sendmail command with parameters
you can fake sendmail with a simple batch or anything
__________________
JD-Dev & Server-Admin |
#469
|
|||
|
|||
Quote:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/desperado591.js github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/desperado591_2.js |
#470
|
|||
|
|||
Ups, I didn´t receive an email notification about your answer, so I just discovered it a moment ago...
Thank you very much for this 2 scripts :-) Now I will need the help of Jiaz to get it running *gg* I will ask him in the German forum, as my English isn´t good enough. |
#471
|
|||
|
|||
Don't know if something like this has been asked for already, I didn't find quite what I need. But it'd be nice if the script-gods would take a look, perhaps.
I need a script that, when a download is finished, extracts the files, deletes the archives and then moves the extracted files to another location. Background on this: I want the download and (especially) the extracting to happen on an SSD, because it's much faster, but the files ultimately stored on a HDD...because size, obviously. |
#472
|
|||
|
|||
Quote:
Quote:
|
#473
|
|||
|
|||
How to run a program when jdownloader quits?
I want to run utorrent after jdownloader has finished downloading. I have it configured so it quits after everything is done (shutdown extension).
I downloaded event scripter but it's very confusing. I just want jdownloader to run "C:\Programs\P2P\uTorrent\utorrent.exe" just before it quits. Thank you! |
#474
|
|||
|
|||
Quote:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/44nonymous.js |
#475
|
|||
|
|||
Quote:
You have to use double slashes, inverted "C:\\...\\...\\utorrent.exe" Thanks! |
#476
|
|||
|
|||
Quote:
Valid formats: Code:
callAsync(null, "C:/Programs/P2P/uTorrent/utorrent.exe"); callAsync(null, "C:\\Programs\\P2P\\uTorrent\\utorrent.exe"); Invalid format: Code:
callAsync(null, "C:\Programs\P2P\uTorrent\utorrent.exe"); |
#477
|
||||
|
||||
Hallo, ich hab mal eine Frage. Bisher habe ich JDownloader 2 auf meinem PC genutzt und dort mit dem Script HIER aus dem ersten Beitrag meine Youtube-Audiofiles erfolgreich in MP3 umgewandelt. Nachdem ich aber jetzt ein Synology NAS habe und JD2 dort installiert habe, bekomme ich das Script da nicht eingefügt. Muss ich dort was besonderes beachten?
__________________
http://img150.imageshack.us/img150/9...ghts1960x1.jpg
**External links are only visible to Support Staff**NICHT KLICKEN!!!!!! |
#478
|
||||
|
||||
Einfach den Wert der Einstellungen-Profieinstellungen-EventScripter.scripts via Copy/Paste von einem JDownloader auf den anderen *rüberkopieren*
__________________
JD-Dev & Server-Admin |
#479
|
|||
|
|||
Backup Link Lists
Code:
// Backup link lists at startup // Trigger: JDownloader started // Backup files will be stored in JD default download folder ["downloadList", "linkcollector"].forEach(function(listType) { var linkList = getPath(JD_HOME + "/cfg/").getChildren().filter(function(file) { return new RegExp(listType + ".+zip$").test(file); }).reverse()[0]; if (!linkList) return; var linkListTime = new Date(linkList.getModifiedDate()).toString().substring(4, 21).replace(/:/g, ""); var backupFolder = callAPI("config", "get", "org.jdownloader.settings.GeneralSettings", null, "defaultdownloadfolder") + "/linkLists/"; var backupFile = linkListTime + " " + listType + ".zip"; linkList.copyTo(backupFolder, backupFile, false); }); |
#480
|
|||
|
|||
Hello,
I haven't seen anything like it, but can a script change the download variant once a link is added to the link grabber? For example, if a Youtube link is added, can a script automatically pick the MP4 or MKV variant (where both available) based on which of the 2 is smaller in size? Thanks, Billy |
Thread Tools | |
Display Modes | |
|
|