JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #241  
Old 01.12.2017, 05:45
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,601
Default

@MaybeGrimm: It is possible to add metadata to a file, using the script, as long as the external program and the target file supports it. The script just passes the relevant variables to the external program. If you want to use 'exiftool', make sure you are able to add the metadata manually via CLI. Then, in the script, modify the path to 'exiftool' and the 'parameters' if necessary.
Reply With Quote
  #242  
Old 01.12.2017, 17:48
MaybeGrimm MaybeGrimm is offline
Ultra Loader
 
Join Date: Nov 2017
Posts: 45
Default

Quote:
Originally Posted by mgpai View Post
@MaybeGrimm: It is possible to add metadata to a file, using the script, as long as the external program and the target file supports it. The script just passes the relevant variables to the external program. If you want to use 'exiftool', make sure you are able to add the metadata manually via CLI. Then, in the script, modify the path to 'exiftool' and the 'parameters' if necessary.
I thought that just for being images (I want the Pinterest comments to appear in the comment metadata of the file) and considering I can put the metadata manually, it has to work. But apparently I can't make it with the CLI and exiftool (IDK if I'm doing everything right).
It's impossible to make it work with another program, right? I that case, I could use a single info-file :/
Sorry for the trouble.
Reply With Quote
  #243  
Old 01.12.2017, 17:54
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,601
Default

Quote:
Originally Posted by MaybeGrimm View Post
... I can't make it with the CLI and exiftool ...
Contact me in JD Chat. I can try to help you troubleshoot.
Reply With Quote
  #244  
Old 03.12.2017, 16:44
ottoS ottoS is offline
Registered / Inactive
 
Join Date: May 2013
Posts: 17
Default How to build an interactive script?

Quote:
Hi,

with the new trigger-functionality now we can start a script on button-press.
Very, very nice.
With this scenario I want to build an interactive script with an datetime-picker at script start.
For instance:
1. button pressed in JD-menu launches the script.
2. the script should launch a dialog box with a datetime-picker (at best there would be a cancel-button).
3. after input the script then processes the value ... (or abortes on cancel-button).

Now my question:
How to render the picker, because we have no html-canvas onto we can render the UI-elements (form, etc)?
(The only GUI-canvas I see is the alert-popup, but can it blown up to a multifunctional UI-element?)


Thx for reading this.
A lot more thanks for a reply.
Rückfrage von JIAZ:
Quote:
Originally Posted by Jiaz View Post
@ottoS: what for do you need the date picker exactly for? You could just let user enter input like hours:minutes:day...
Antwort von ottoS:
Ok, the date picker is nice, but separate inputs will also be fine.
But this brings me to my next question: How to render a self-composed input-dialog-UI with a bunch of canvas elements (label, input-fields, buttons) in the jd-desktop-GUI environment?

thx
Reply With Quote
  #245  
Old 04.12.2017, 12:34
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,051
Default

Quote:
Originally Posted by ottoS View Post
How to render a self-composed input-dialog-UI with a bunch of canvas elements (label, input-fields, buttons) in the jd-desktop-GUI environment?

thx
That is not possible and I don't think that we will add support such feature in near future/at all. The moment that kind of gui is required, I think it makes more sense to code it outside of JDownloader and communicate via API with JDownloader
__________________
JD-Dev & Server-Admin
Reply With Quote
  #246  
Old 08.12.2017, 22:52
Agita
Guest
 
Posts: n/a
Default Several questions

Hi there Pls excuse me but i got some questions where this thread and the script-editor help-page didnt helped me out :(

1) Is it possible to handle the proxy list (instead of just accessing the environment variable)?
2) is there a function for links like mylink.hasStopMark() ?
3) is there a way to get proxy address of a link?
4) how to execute a scipt just once (if i wanna create an infinite while(true)-loop)
would setting "interval = 99999999....." do the job?
5) about the status string of the links (mylink.getStatus()) ... they are all localized. so I have to define a config var at the top of the script like this?
Code:
cfgstr.waitingNoConnection = "Keine Internetverbindung?";
...
if(link.getStatus() == cfgstr.waitingNoConnection) {
...
or is there a better way?

Many many thanks in advance

-----------------------------------------------------------------------------------
UPDATE:

Ok, I managed to create my own solution for the link status problem

But for the other of my points I didnt find any workaround yet :/

Last edited by Agita; 10.12.2017 at 17:57.
Reply With Quote
  #247  
Old 13.12.2017, 15:22
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,601
Default

Quote:
Originally Posted by Agita View Post
2) is there a function for links like mylink.hasStopMark() ?
API call can be used to get the stopmarkedlink, which can then be compared with 'mylink.'
Code:
var stopMarkedLink = callAPI("downloadsV2", "getStopMarkedLink");

Quote:
4) how to execute a scipt just once (if i wanna create an infinite while(true)-loop)
would setting "interval = 99999999....." do the job?
Tried the event trigger "Jdownloader started"? Mainly depends on the type of script. Can also build/use time based events.
Reply With Quote
  #248  
Old 14.12.2017, 14:04
Agita
Guest
 
Posts: n/a
Default

That stopMarkedLink-Thingy is neat Thank you
Well, the trigger "Jdownloader started" just gets called right after JD started and not when it has been started already and the script is beeing configured and saved.. But never mind I will find a way

And for the getStatus() behaviour I added an attachement with my solution and onetwo other things, if someone needs it

EDIT 2020-05-18 by pspzockerscene:
Public download URL because forum attachments can only be accessed by mods:
workupload.com/file/bGhNgc9txfP
Attached Files
File Type: zip Jdownloader2-EventScripter-Library-master.zip (67.3 KB, 1 views)

Last edited by pspzockerscene; 18.05.2020 at 15:37.
Reply With Quote
  #249  
Old 15.12.2017, 20:58
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,051
Default

@Agita: What are you trying to achieve? Then we can provide more information/help better
__________________
JD-Dev & Server-Admin
Reply With Quote
  #250  
Old 19.12.2017, 13:11
donnje
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by mgpai View Post
Code:
// Move finished non-archive files, to user defined folder
// Trigger required: "A Download Stopped"

var destFolder = "c:/myFolder/movedFiles"; // <- Set destination folder.

if (link.isFinished() && !link.getArchive()) {
    getPath(link.getDownloadPath()).moveTo(destFolder);
}
HI,
If I make a script test I have this error
RefereceError: "link" is not defined. (#6)
where am I wrong?
Reply With Quote
  #251  
Old 19.12.2017, 13:13
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,051
Default

@donnje: What trigger did you use? Please be aware that it depends on the set trigger what objects you can access
__________________
JD-Dev & Server-Admin
Reply With Quote
  #252  
Old 19.12.2017, 13:24
donnje
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
@donnje: What trigger did you use? Please be aware that it depends on the set trigger what objects you can access
on event script i make a new script and past the code
i put a none trigger
can you explain to me how I can do, please?
Reply With Quote
  #253  
Old 19.12.2017, 13:26
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,051
Default

Script will only work with a trigget that provides a link object. See the comment in script *Trigger required: "A Download Stopped"
__________________
JD-Dev & Server-Admin
Reply With Quote
  #254  
Old 19.12.2017, 13:39
donnje
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
Script will only work with a trigget that provides a link object. See the comment in script *Trigger required: "A Download Stopped"
i make a new script and i put on trigger "A Download Stopped" but don't worked, the downloaded file is not moved
sorry maybe Am 'I wrong script ?
I want the finished downloads to be moved to a dedicated folder

Last edited by donnje; 19.12.2017 at 13:42.
Reply With Quote
  #255  
Old 19.12.2017, 14:15
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,051
Default

Can you please show the complete script?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #256  
Old 19.12.2017, 14:22
donnje
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
Can you please show the complete script?
I put

// Move finished non-archive files, to user defined folder
// Trigger required: "A Download Stopped"

var destFolder = "c:/myFolder/movedFiles"; // <- Set destination folder.

if (link.isFinished() && !link.getArchive()) {
getPath(link.getDownloadPath()).moveTo(destFolder);
}


Last edited by donnje; 19.12.2017 at 14:26.
Reply With Quote
  #257  
Old 19.12.2017, 14:25
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,051
Default

the script does not move archive parts, you know that?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #258  
Old 19.12.2017, 14:27
donnje
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
the script does not move archive parts, you know that?
tnx for your patience
I don't understand
I would like to move the files I have completed to download to a specific folder, is it posible?
Reply With Quote
  #259  
Old 19.12.2017, 14:29
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,051
Default

yes, but the script does only move *non archive files*. Archive files are not moved to not break extraction
__________________
JD-Dev & Server-Admin
Reply With Quote
  #260  
Old 19.12.2017, 14:44
donnje
Guest
 
Posts: n/a
Default

my file is "no archive file" :(

Last edited by donnje; 19.12.2017 at 21:34.
Reply With Quote
  #261  
Old 20.12.2017, 10:23
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,051
Default

Please provide a logfile https://support.jdownloader.org/Know...d-session-logs
and post shown logID here
Also create some screenshots that show the eventscripter settings and script
Make sure the destination folder exists!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #262  
Old 20.12.2017, 10:53
donnje
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
Please provide a logfile **External links are only visible to Support Staff**...
and post shown logID here
Also create some screenshots that show the eventscripter settings and script
Make sure the destination folder exists!
Tnx now it worked
I inserted in the script a different folder from c:/myFolder/movedFiles
can I change this folder?

Last edited by donnje; 20.12.2017 at 11:07.
Reply With Quote
  #263  
Old 20.12.2017, 10:57
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,051
Default

You've got to create the folder first. It must exist!
Thanks for the feedback!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #264  
Old 20.12.2017, 11:52
donnje
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
You've got to create the folder first. It must exist!
Thanks for the feedback!
Thanks for all
Reply With Quote
  #265  
Old 23.12.2017, 23:19
donnje
Guest
 
Posts: n/a
Default

what is this option?
should I enable it?

Last edited by donnje; 23.12.2017 at 23:49.
Reply With Quote
  #266  
Old 28.12.2017, 14:58
HFS8cxqkzepybKtyG4dV
Guest
 
Posts: n/a
Default

Hi all...

I'm looking for a script that:
  1. checks if a package got extracted completely (deep extract)
  2. determines the biggest extracted file (subfolders?!)
  3. sets the packagename as filename for that file
  4. moves that file to a defined location
  5. deletes all the other extracted files/folders
I would do it by myself, but I didn't find any docs about the api, ...
Any help is welcome and really appreciated.

Merry X-Mas/Happy New Year and thanks in advance!

Cheers,
flow
Reply With Quote
  #267  
Old 09.01.2018, 13:53
Agita
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
@Agita: What are you trying to achieve? Then we can provide more information/help better
Sorry for my late response and happy new year

Well I am using free proxies for downloading and I just wanted to automaticly remove all crappy ones (not online, low speed, auth required, ...). That's why I was searching how to manage custom proxy list via event scripter. Everything else (the stop mark thingy) is working fine now. Thx

Best wishes
Agi
Reply With Quote
  #268  
Old 15.01.2018, 15:16
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,051
Default

@Agita: you can access proxy list via Advanced Settings API and InternetConnectionSettings.customproxylist
Better ask mgpai for help how to read/set this config value
__________________
JD-Dev & Server-Admin
Reply With Quote
  #269  
Old 20.01.2018, 17:05
plaintext plaintext is offline
BugMeNot Account
 
Join Date: Sep 2016
Posts: 241
Default

please delete or ignore

Last edited by plaintext; 22.01.2018 at 14:37.
Reply With Quote
  #270  
Old 22.01.2018, 14:53
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,051
Default

@plaintext: not possible (yet)
__________________
JD-Dev & Server-Admin
Reply With Quote
  #271  
Old 29.01.2018, 18:41
neik
Guest
 
Posts: n/a
Default

Hi guys, have been looking into automating the JDownloader process but unfortunately ran into problems solving that.

I would need a Script which would grab the extracted folder or and file(s) and move them to a specific directory after extraction. What @donnje is looking for actually sounds the same what I've been looking for.

Would that be possible? Any hint would be appreciated!

Thanks a lot for your great effort!

€dit: This seems also similar to what I am looking for, right?: https://board.jdownloader.org/showpo...&postcount=159

Last edited by neik; 29.01.2018 at 18:52.
Reply With Quote
  #272  
Old 31.01.2018, 13:36
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,601
Default

Quote:
Originally Posted by HFS8cxqkzepybKtyG4dV View Post
... I didn't find any docs about the api, ...
Available methods/help can be found in the the built-in script editor. If you need further help with your script, feel free to post it here.

Quote:
Originally Posted by neik View Post
... I would need a Script which would grab the extracted folder or and file(s) and move them to a specific directory after extraction ...
'Packagizer' has an option to rename/move files after extraction. Tried it?
Reply With Quote
  #273  
Old 31.01.2018, 15:03
Buggys
Guest
 
Posts: n/a
Default

Can I please request a script for Mega.co.nz? Mega decrypts the file after a download finishes. I'd like a script that can start the next download while jdownloader is still decrypting the last file downloaded from mega. I hope you can help me.
Reply With Quote
  #274  
Old 31.01.2018, 16:52
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,671
Default

@Buggys
not possible if its core controlled which it is in this case.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #275  
Old 31.01.2018, 23:26
neik
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by mgpai View Post
'Packagizer' has an option to rename/move files after extraction. Tried it?
Hi mgpai, thanks for replying! :-)

I found that option within the JD GUI of Windows too but unfortunately on my headless Linux machine I do not find that option in the MyJDownloader GUI.

I was even able to export on packagizer file from the Windows installation but I do not know how to activate it in the headless machine.

Any hints?
Reply With Quote
  #276  
Old 01.02.2018, 12:09
Mohadib
Guest
 
Posts: n/a
Post Script for Unrar soft selection

Hello everyone
(I'm a French guy, so sorry for my grammar)
I would like to know if you had a script to call WinRAR (v5.50 in Windows 10 x64) instead of 7Zip, for the automatic decompression of downloaded archives, (with deletion of archives when the extraction and realized successfully);
It's possible? or not?

because I find WinRAR much more powerful in terms of extraction stability, and it manages the RAR5 wonderfully. (normal will you say),
Thank you in advance for your help and thank you for supporting this amazing program.

Thanks again.
From France with love

Last edited by Mohadib; 01.02.2018 at 12:11.
Reply With Quote
  #277  
Old 01.02.2018, 16:10
HFS8cxqkzepybKtyG4dV
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Mohadib View Post
because I find WinRAR much more powerful in terms of extraction stability, and it manages the RAR5 wonderfully. (normal will you say),
Why don't you use the RAR5-supporting BETA libs from here: https://board.jdownloader.org/showthread.php?t=71069 ?
Reply With Quote
  #278  
Old 02.02.2018, 01:05
Mohadib
Guest
 
Posts: n/a
Default

Hi HFS8cxqkzepybKtyG4dV;
Thank you for taking the time to respond.
I thought about it, but the observation that I made and that winRAR
decompresses archives much faster than 7zip (at least 50% faster)

e.g: to decompressed a folder (BDMV folder) of about 40 GiB it takes
~ 50mn to 7Zip with my n3150 (Celeron @ 4*1.6GHz)
and 25mn with winRAR;

In addition, without criticism 7Zip (which is very good, and free)
WinRAR has always been my favorite, for reasons of stability among others.

But of course, if it is not possible to do differently, I accept
this method, but the RAR5 support was not my priority on this request.

Thanks again.
From France with love.

Edit: After testing the 7Zip lib in beta
HFS8cxqkzepybKtyG4dV give me,
its speed at extraction is comparable to
WinRar, so in the end, my request does not
place to be.
Thank you for the patience, and for the work.

Last edited by Mohadib; 03.02.2018 at 11:36. Reason: add comment after test Beta lib of 7Zip
Reply With Quote
  #279  
Old 05.02.2018, 17:36
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,051
Default

@Mohadib: the old (current) extraction library had severe speed issues for 7zip archives. Those were fixed in newer versions of the library and as the library uses the same extraction source as 7zip/winrar, it should be about the same speed.
Thanks for the feedback!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #280  
Old 05.02.2018, 17:37
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,051
Default

@neik: you can copy/paste Settings-Advanced Settings, PackagizerSettings.rulelist
For eventscripter, EventScripter.scripts
__________________
JD-Dev & Server-Admin
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 01:34.
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.