JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #461  
Old 30.04.2018, 10:13
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,232
Default

@mgpai: the new method is available. you can rewrite the script to use it
__________________
JD-Dev & Server-Admin
Reply With Quote
  #462  
Old 30.04.2018, 10:22
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,528
Default

Quote:
Originally Posted by Jiaz View Post
... the new method is available ...
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)
Reply With Quote
  #463  
Old 30.04.2018, 11:44
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,232
Default

Will be added with next full build in about 10 mins
__________________
JD-Dev & Server-Admin
Reply With Quote
  #464  
Old 04.05.2018, 16:06
desperado591 desperado591 is offline
Ultra Loader
 
Join Date: Mar 2018
Posts: 45
Default

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.
Reply With Quote
  #465  
Old 04.05.2018, 18:27
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,528
Default

Quote:
Originally Posted by desperado591 View Post
... I am looking for an opportunity to send an email whenever JD has finished a download or extraction task ...
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.
Reply With Quote
  #466  
Old 04.05.2018, 18:35
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,232
Default

@mgpai: see mkleine.de/blog/2016/01/07/synology-sendmail-per-shell-aktivieren/ for commandline
__________________
JD-Dev & Server-Admin
Reply With Quote
  #467  
Old 04.05.2018, 18:49
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,528
Default

Quote:
Originally Posted by Jiaz View Post
@mgpai: see mkleine.de/blog/2016/01/07/synology-sendmail-per-shell-aktivieren/ for commandline
I guess that only provides information on how to activate the mail module. I think using Linux Sendmail would also be an option. In any case, I wont be able to test any of them myself.

I can always provide a solution using (free) 3rd party software which can also be used in Linux.
Reply With Quote
  #468  
Old 04.05.2018, 18:52
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,232
Default

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
Reply With Quote
  #469  
Old 04.05.2018, 20:09
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,528
Default

Quote:
Originally Posted by desperado591 View Post
... send an email whenever JD has finished a download or extraction task ...
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/desperado591.js
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/desperado591_2.js
Reply With Quote
  #470  
Old 09.05.2018, 20:24
desperado591 desperado591 is offline
Ultra Loader
 
Join Date: Mar 2018
Posts: 45
Default

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.
Reply With Quote
  #471  
Old 13.06.2018, 20:20
Pixel1191
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #472  
Old 14.06.2018, 08:19
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,528
Default

Quote:
Originally Posted by Pixel1191 View Post
... when a download is finished, extracts the files, deletes the archives
Settings > Archive Extractor > Delete Archive Files ...

Quote:
... and then moves the extracted files to another location.
Settings > Packagizer > Create rule ("Move to") and set folder to which the extracted files should be moved to.
Reply With Quote
  #473  
Old 17.06.2018, 18:03
44nonymous
Guest
 
Posts: n/a
Default 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!
Reply With Quote
  #474  
Old 18.06.2018, 08:01
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,528
Default

Quote:
Originally Posted by 44nonymous View Post
I want to run utorrent after jdownloader has finished downloading ... just before it quits.
While it is possible to run it after JD has finished downloading, it may not be possible to do it "just before it quits.", as there is no trigger corresponding to that event.

Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/44nonymous.js
Reply With Quote
  #475  
Old 18.06.2018, 08:35
44nonymous
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by mgpai View Post
While it is possible to run it after JD has finished downloading, it may not be possible to do it "just before it quits.", as there is no trigger corresponding to that event.

Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/44nonymous.js
It does not work. Cannot run program "C:ProgramsP2PuTorrentutorrent.exe": CreateProcess error=2, The system cannot find the specified file

You have to use double slashes, inverted "C:\\...\\...\\utorrent.exe"

Thanks!
Reply With Quote
  #476  
Old 18.06.2018, 23:24
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,528
Default

Quote:
Originally Posted by 44nonymous View Post
It does not work. Cannot run program "C:ProgramsP2PuTorrentutorrent.exe": CreateProcess error=2, The system cannot find the specified file
Caused by using "backslash" (without escaping) as separator iinstead of "slash" as used in the script.

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");
Reply With Quote
  #477  
Old 22.06.2018, 22:39
SithLordMichi's Avatar
SithLordMichi SithLordMichi is offline
JD Fan
 
Join Date: Mar 2009
Posts: 73
Default

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!!!!!!
Reply With Quote
  #478  
Old 25.06.2018, 12:04
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,232
Default

Einfach den Wert der Einstellungen-Profieinstellungen-EventScripter.scripts via Copy/Paste von einem JDownloader auf den anderen *rüberkopieren*
__________________
JD-Dev & Server-Admin
Reply With Quote
  #479  
Old 26.06.2018, 12:52
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,528
Default 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);
});
Reply With Quote
  #480  
Old 28.06.2018, 07:29
BillyCool BillyCool is offline
Super Loader
 
Join Date: Sep 2016
Location: Australia
Posts: 28
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes

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 05:42.
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.