#1041
|
|||
|
|||
Quote:
The URL which you have posted is only visible to the staff members. Please find me in JD Chat if you need a solution using eventscripter. |
#1042
|
|||
|
|||
Link removal or reset for specific host
Can somoneone help me with setting up a script for a specific hoster?
For host "x.com"
Thank you in advance! |
#1043
|
|||
|
|||
As in post https://board.jdownloader.org/showpo...postcount=1015 can the Downloads be reset with a script to "Reset" after they are downloaded so I can download them again with the scheduler using 30 minute intervals? Now I have to right click all downloads and choose "Other" then "Reset" then the scheduler works.
Thanks! |
#1045
|
|||
|
|||
Quote:
Code:
// Remove download link, if file exists on disk // Trigger : A Download stopped var myHosts = ["example.com", "site.com", "demo.com"]; var host = link.getDownloadHost(); var finalStatus = link.getFinalLinkStatus(); if (myHosts.indexOf(host) > -1 && finalStatus == "FAILED_EXISTS") link.remove(); Using script for this can result in an infinite loop. If you provide the logs, the developers might be able to check and fix it at the plugin level. |
#1046
|
|||
|
|||
Hi, the MP3 scripct at the beginning of this topic does not work for me. what am I doing wrong?
|
#1047
|
|||
|
|||
Quote:
If you need help with troubleshooting, you can find me in JD Chat. Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader |
#1048
|
|||
|
|||
it works now. the save button was hidden. However thank you for your help.
|
#1049
|
|||
|
|||
Hello, I would please need a script which fixes the faulty status of some "Zippyshare" downloads (usually just one) that get stuck every now and then, blocking the "shutdown extension" and, consequently, making my PC stays on all the time just because one or two incomplete files. The problem's details over here:
https://board.jdownloader.org/showthread.php?t=82780 I think a script doing this would fix the issue: While the download process is active, if there is a "temporarily unavailable" (with a 30' counter) message, or a ""Retry in 15..." one (), make it "stops" (Ctrl+S) the whole process and "starts" (Ctrl+S) it again; in case the same messages (or even some other one which implies the download can't be accomplished) repeat the same step three times. If none of the three previous attempts didn't work, make it "stops" (Ctrl+S) the whole process, "resets" the specific file and "starts" (Ctrl+S) it again. Finally, if the download still fails after being reset, make it "stops" (Ctrl+S) the whole process, which should let the "shutdown extension" trigger the sleeping task. If there is more than one faulty file, the script should process each of them sequentially, and trigger the "shutdown extension" only after the last one was analyzed. Thanks. Last edited by ElCho; 29.01.2020 at 10:38. |
#1050
|
|||
|
|||
Quote:
Alternatively, you might be able to achieve the same result with the following script. It will skip/restart (or reset, depending on if any data has been downloaded for that link) failed downloads as long as other downloads are active. In the event they do not start during that period, they will remain skipped and allow the extension to shutdown the system. Code:
// Skip/Unskip (or reset) unfinished downloads from user-spcified hosters // Trigger: A download stopped var myHosts = ["example.com", "demo.com,", "zippyshare.com"]; // <- Process links only from these hosters if (link.isFinished()) { getAllDownloadLinks().filter(function(link) { if (link.isFinished()) return; if (myHosts.indexOf(link.getHost()) == -1) return; if (!link.isSkipped()) return; if (link.getSkippedReason() != "MANUAL") return; if (link.getBytesLoaded()) link.setSkipped(false); if (!link.getBytesLoaded()) link.reset(); }) } if (!link.isFinished() && myHosts.indexOf(link.getHost()) > -1) { link.setSkipped(true); } Last edited by mgpai; 29.01.2020 at 18:28. |
#1051
|
|||
|
|||
I just tried that script with a new downloads' batch, and despite there was one of those faulty incomplete downloads, nothing happened. I imported it "as is" into JD2's even scripter and make it active; maybe because it didn't get a correct "trigger"? I set it as "interval", since after importing it, there was no one.
What I just realized, is that when that ""temporarily unavailable" message start appearing, for some weird reason JD2 doesn't even try a new attempt but it just "reset" the time counter only. When I come back to the PC, I just stop the downloading process and start it again, and then the files get completed. So, I'm still kind of sure it has to be with some JD2's specific glitch. I'm still able to replicate the error messages using some faulty download links, and have some basic Java knowledge, so in case you want to create that script I mentioned before, I could set up a VM, if needed. |
#1052
|
|||
|
|||
Quote:
Code:
// Trigger: A download stopped It is not set automatically. You have to manually select it from the drop-down menu of "Trigger" column in the script list in eventscripter panel. You can find me in JD Chat, if you need any help setting it up. Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader |
#1053
|
|||
|
|||
Earlier today I left JD2 downloading using the script with the needed trigger, and after returning
I encountered the system was still on, so the shutdown extension wasn't executed. The weird thing is, the downloads were all completed but the script itself failed, since there were a few error messages: As well as this error message window, whose there were around "50" of them: They were shown at the same time, and right after I closed them, three of teh downloads were marked as "completed", as if they were just finished, although I'm afraid they were already downloaded. The script got disabled after that. Last edited by ElCho; 31.01.2020 at 04:07. |
#1054
|
|||
|
|||
It appears that a '}' (curly bracket) is missing from your script. Compare your script with the one posted in the forum and make the necessary changes to it, or delete all scripts from the eventscripter and paste the one my earlier post and try again.
|
#1055
|
|||
|
|||
I finally could try it, but so far I found two issues:
1 - It triggers the "skipped" status, which hasn't the same outcome as when I manually do the "stop/start" sequence manually. Skipping will not even do a single retry on the faulty file. 2 - It is too "sensitive" so to speak, in the sense that it triggers the "skipped" state too quickly; sometimes even without reaching %0,10 progress. Thanks. |
#1056
|
|||
|
|||
Quote:
'unskip' is only used on partially downloaded files. Links where no data has yet been downloaded will be 'reset'. Unlike 'unskip' it will definitely try to start the download during the next attempt. Quote:
As mentioned in the chat room, you may not even need to use the script. Just using less than 20 chunks per download might also most likely solve the issue. Jiaz has noted that other users haven't reported similar issue with that host. It is quite likely due to using less chunks. |
#1057
|
||||
|
||||
I kinda hinted at chunking, jd core is not good with many chunks. slighest issue with one of the connection all the good ones are terminated, and download is restarted just to resume one of the broken connections.
Also note that zippy used to fight us bad, and plugin isn't designed to give good error feedbacks. its all set to wait, which I didn't allude to before, which is probably the issue for never giving up. That said script solution might not be required if you use less chunks assuming that the issue is that and not javascript trickery.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#1058
|
|||
|
|||
Hi to all a liitle help please, I have a synology nas with jdownloader package installed, is there a way when a file had finished the nas sent me an email that the file was finished? I had read about a script but I cannot find if is this possible.
The download synology package can do that but jdownloader is much much better. Thank you in advance. |
#1059
|
|||
|
|||
Quote:
|
#1060
|
|||
|
|||
Quote:
Thanks in advance github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/desperado591.js github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/desperado591_2.js |
#1061
|
|||
|
|||
Quote:
As far as the scripts are concerned, one will send an email when download is finished and other one when extraction is finished. You can use either or both. To use the script you need to install/enable eventscripter extension in JD. Install and test the scripts in a JD install with GUI and then copy the contents or the file "org.jdownloader.extensions.eventscripter.EventScripterExtension.scripts.json' to the headless install. The JSON file will be located in the 'cfg' folder. |
#1062
|
|||
|
|||
Hi my friend again I am trying to make this work, first question in the below script
// Send email notification (NAS) // Trigger Required: A Download Stopped // Important: Enable "Synchronous execcution" checkbox in top panel if (link.isFinished()) { var absender = "nas@domain.de"; var empfaenger = "empfaenger@domain.de"; var inhalt = getPath(JD_HOME + "/link - inhalt.txt"); writeFile(inhalt, "Link Finished: " + link.getName(), true); callSync("sendmail", "-F", absender, "-t", empfaenger, "<", inhalt); deleteFile(inhalt, false); } I change only the text inside the quotes with my sender email in var absender = "nas@domain.de"; and the reciever email in var empfaenger = "empfaenger@domain.de"; nothing else? I managed to install event scripter in JD in my nas and activate it and activate and the script, but it is not working. I tried to ssh to the nas the sentmail command but I have the response sentmail: command not found, so I must search the net what else to do in my nas to activate sentmail ..... it seems difficult to me, I don't want to bother you any more... Thank you very much for the help I don't know if anyone in this forum that had managed to make this work to help a little. Edit I had made an improvement I managed to get sentmail command to work, I had to install mailserver package in synology and configuring it. Now when download is finished I recieve an email in my spam folder without subject and without body But if I run a script within my synology task manager with the following format email has title body subject and it goes in my inbox perfect, the format is the below sendmail -F "Synology Station" -f "sender@here.com" -t reciever@herere.com << EOF Subject: Synology Mail Test All working fine. EOF Is it easy for you to convert the above jdownloader script to this format I had not know how... Thanks in advance. Last edited by leotzian; 07.02.2020 at 10:59. |
#1063
|
|||
|
|||
Check the synology forum for articles/tutorials on how to configure email server. The script will work only if you are able to send email via CLI. It is very likely other are sending email notifications via eventscripter.
|
#1064
|
|||
|
|||
Quote:
Method: Code:
var myString = callSync(myString[]);/*Call a local Process. Blocks Until the process returns*/ /* Example: */var pingResultString = callSync("ping","jdownloader.org"); I am guessing something like this may work: Code:
callSync("sendmail", "-F", "\"Synology Station\"", "-f", "\"sender@here.com\"", "-t", "reciever@herere.com", "<<", "EOF", "\r\nSubject: Synology Mail Test\r\nAll working fine.\r\n", "EOF"); Also, I am not sure how linux handles "\r\n". |
#1065
|
|||
|
|||
I CAN sent emails via CLI, but I cannot make the script in Jdownloader to work, email IS sent but goes to spam it has no title, body and subject.
Your suggestion is not working. I will search synology forums for help, now with your help I know what to search for. Thanks for your help. |
#1066
|
|||
|
|||
Quote:
Code:
mkleine.de/blog/2016/01/07/synology-sendmail-per-shell-aktivieren/ English version: Code:
// Send email notification (NAS) // Trigger Required: A Download Stopped // Important: Enable "Synchronous execcution" checkbox in top panel if (link.isFinished()) { var sender = "sender@here.com"; var receiver = "reciever@herere.com"; var message = getPath(JD_HOME + "/download finished notification.txt"); writeFile(message, "Link Finished: " + link.getName(), true); callSync("sendmail", "-F", sender, "-t", receiver, "<", message); deleteFile(message, false); } In this case the message body is first written to a temp file and then passed to the call. I guess it might also be possible to include the subject in it. |
#1067
|
|||
|
|||
Quote:
I tested your script it is not working, I don't want what is going on, I tried with other email adress Download is finished at once an email is sent from the sender's email, to the recievers inbox BUT ir had not Title subject or Body only From to . In my nas had installed from community repo the only version they have look the photo attachment, also If I olen from the nas the file created by the script org.jdownloader.extensions.eventscripter.EventScripterExtension.scripts.json usinf text edidor the format is not the same as the original script is this normal? [ { "eventTrigger" : "ON_DOWNLOAD_CONTROLLER_STOPPED", "enabled" : true, "name" : "Event Script", "script" : "// Send email notification (NAS)\n// Trigger Required: A Download Stopped\n// Important: Enable "Synchronous execcution" checkbox in top panel\n\nif (link.isFinished()) {\n var sender = "sender@gmail.com";\n var receiver = "reciever@otenet.gr";\n var message = getPath(JD_HOME + "/download finished notification.txt");\n\n writeFile(message, "Link Finished: " + link.getName(), true);\n callSync("sendmail", "-F", sender, "-t", receiver, "<", message);\n deleteFile(message, false);\n}\n", "eventTriggerSettings" : { }, "id" : 1581153863487 } ] Perhaps a bug in the NAS version of JDownloader? |
#1068
|
|||
|
|||
Quote:
Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader |
#1069
|
|||
|
|||
Quote:
1- Does it necessarily have to wait for a successfully completed download to trigger the "skip/unskip" sequence? I mean, in the case there aren't no new downloads to start but they all were already put into a "skipped" condition, couldn't it just wait a few seconds, and then retry over those? 2- Something weird happened with the last downloads' batch I left, since despite there was still a pending download, the system was put to sleep: 3- Could the script "skipping" action be triggered not right after after it detects a problem was found with one of the connections, but just after its third time doing that? So, that way it lets JD2 retry by itself at least three times, thus avoiding skipping right away downloads which can be resumed correctly after a few attempts. Or maybe, triggering the "skipping" condition only "1" minute after a determined download was put into a "waiting" or a "stopped" state. As I told you before in private, I played a little bit with less connections/chunks, but doing it that way would suppose wasting available bandwidth and, consequently, more time. Last edited by ElCho; 10.02.2020 at 04:07. |
#1070
|
||||
|
||||
Quote:
Quote:
Quote:
The script I have provided does not limit the number of retries, so I don't see any benefit with the system you have suggested. You can always modify the existing script or create a new one to come up with a solution which is acceptable to you. All available methods are listed in the Help menu. Quote:
The best solution to this problem is to prevent connection issues, either by using less total connections or using the 'automax' advanced setting option, to start new downloads till the bandwidth is saturated. |
#1071
|
|||
|
|||
Quote:
Quote:
Quote:
Anyway, since my original intention was and still is to avoid the system keeps idling just because every now and then one or two files get a looping timer, I think the current script although not perfect, aids in that sense. An ideal one would simply limit to do what I manually do whenever I find a download in such a state, but I know of the message's related limitation. Regarding the connection performance, I know it is a high amount of connections, but after doing some tests, I noted that if I use a smaller amount, the bandwidth will certainly not be maximized in a constant way, till all downloads are completed. Anyway, I will try that "automax" feature you mentioned. Thanks. |
#1072
|
|||
|
|||
Hi there,
new to jd scripting and need a little help. Im trying to check to which proxy a download is connected and if a condition is met, to disable/enable that proxy. Additionally changing the proxys priority would also be helpful. Are there such methods? couldn't find any in the documetation. How could this be implemented? Code:
var running = getRunningDownloadLinks(); for (i = 0; i < running.length; i++) { var download = running[i]; //get connected proxy Proxy proxy = download.getProxy(); //if condition meets disable proxy.setDisabled(true); //or if condition meets change priority proxy.setPriority(Priority.MAX); } |
#1073
|
|||
|
|||
Quote:
It is possible to enable/disable/remove the proxy using the 'config' namespace of MYJD API. You can create a event based or interval based script, which can test the proxies in the list and enable/disable/remove them from the it. There is also a method in eventscripter API, which returns 'banned' proxies, which might be of help to identify problematic proxies. Connections details are also logged in some files which can be found in 'JD\logs' folder, but parsing them might not be very convenient or practical. By default JD uses the connections in the order they appear in the list. An alternative to priority might be to arrange them in the order of your preference. You can set/change the proxy selection mode in "GeneralSettings.freeproxybalancemode" (Advanced Setting). |
#1074
|
|||
|
|||
Quote:
Another approach to solve the problem: I know we can ckeck if a Proxy is up by using the getPage method in a try catch blog. But is it possible in any way to measure the transfer speed of the proxy in a simple way? Code:
//Is proxy up var browser = getBrowser(); browser.setProxy(...); browser.getPage("http://www.google.com"); //Is proxy fast var browser = getBrowser(); browser.setProxy(...); int time = browser.getLoadTime("http://www.google.com"); if(time.... |
#1075
|
|||
|
|||
Quote:
Code:
var startTime = new Date(); var page = getPage("http://www.google.com"); var endTime = new Date(); var loadTime = endTime - startTime; alert(loadTime); |
#1076
|
|||
|
|||
|
#1077
|
|||
|
|||
JD2 and Synology NAS email Sent after Download Finished
Hi to all I open a new thread if anyone has found a solution to this I had searched a lot but I could not find a person who had managed to solve this issue.
I had tried with @mgpai hours in the chat to solve the task I want, I don't know If you have any idea of that. I want when JD finished a download to sent me an email. I had installed mail server in the nas that installs postfix sendmail command. I had managed to get email sent with commands using sunology CLI but the same commands using script manager are not working. The command that it is working is sendmail -vt < /mail.txt in mail.txt I have the format =================== To: reciever@otenet.gr Subject: JDownloader Downloads From: sender@gmail.com Body of the message ==================== This command sents an email with sender reciever in recievers mailbox, with subject and body. With @mgpai he managed to create the txt file filled with the correct data of the downloaded file ( subject and file details ). When I run this command using CLI of synology ssh it is working fine If I make a script with this command in Task scheduler of my nas it is working ok, BUT if I try to add THE SAME COMMAND using script in event scripter, WE had tried 1000 compinations with /r/n etc or different syntax , it is not working, The command cannot access the mail.txt file and the "<" symbol is not recognised. I had tried to store the mail.txt in several locations with the same result. I don't if it permision issue. I had installed JD through the synology community repo through the package manager in my NAS Do you have any ideas where to look for or what to do? Another format that is working using CLI is sendmail -F "Synology DS416Play" -f "sender@gmail.com" -t "reciever@otenet.gr" Subject: JDownloader Downloads Download had been finished EOF In the CLI I have to press enter after each line but in the script /r/n/ commands are not recognized as line feed or carriage return, by my nas and in the mail server log it seams that I have emails to recievers like - Subject ,Jdownloader,Downloads EOF etc Very crazy though If anyone who owns a Synology NAS had managed to make this work please a little help please. Thanks in advance and sorry for the big post. |
#1078
|
||||
|
||||
Merged EventScripter threads.
@leotzian Your issue is a script issue but not a general JDownloader issue/bug. Please keep in mind that we do not provide support for individual scripts - they are NOT in any way official parts of our application! You will have to rely on other users to help you with this. -psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#1079
|
||||
|
||||
@mgpai
Is it possible via one of the triggers to have a script automatically crawl and fetch RapidRar(RR) links from the rmz.cr main page matching '1080p VXT' or '1080p RARBG' in the title name and add those links to the linkgrabber queue or a text file and start only from the current date for newly posted titles that match either keyword set? Code:
**External links are only visible to Support Staff** |
#1080
|
|||
|
|||
Quote:
Related Script: Post #1002 |
Thread Tools | |
Display Modes | |
|
|