#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
|
|||
|
|||
![]()
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 ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#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 | |
|
|