JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1561  
Old 25.10.2020, 08:39
Dockel Dockel is offline
JD Legend
 
Join Date: Feb 2020
Posts: 664
Default

Thank you very much!

I have to replace the last two of these (three related) scripts with that new one, is it right:


Is there a way to mark (by color or so) / recognize scripts belonging together in the Even Scripter?
__________________
Aktuelles Windows

Last edited by Dockel; 25.10.2020 at 08:41.
Reply With Quote
  #1562  
Old 25.10.2020, 08:43
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by Dockel View Post
I have to replace the last two of these (three related) scripts with that new one, is it right:
Yes. Correct.
Reply With Quote
  #1563  
Old 25.10.2020, 08:57
Dockel Dockel is offline
JD Legend
 
Join Date: Feb 2020
Posts: 664
Default

OK, all done. Works great! Many thanks again!
__________________
Aktuelles Windows
Reply With Quote
  #1564  
Old 26.10.2020, 18:57
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
Default

Quote:
Originally Posted by Dockel View Post
Is there a way to mark (by color or so) / recognize scripts belonging together in the Even Scripter?
Nice idea! For example in edit dialog you can specify a colour, okay?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1565  
Old 26.10.2020, 20:31
Dockel Dockel is offline
JD Legend
 
Join Date: Feb 2020
Posts: 664
Default

Yes, that would be great, of course! Thank you!

So here, may be a second (colored) arrow (within a column or so):
__________________
Aktuelles Windows
Reply With Quote
  #1566  
Old 27.10.2020, 06:21
abrenoch abrenoch is offline
JD Alpha
 
Join Date: Apr 2010
Posts: 21
Default

Could someone maybe help me out please?

I am trying to make a 'new crawler job' script, but the 'var myCrawlerJob = job;' line to get the added job doesn't seem to work. it always results in an undefined variable.

Thanks in advance!
Reply With Quote
  #1567  
Old 27.10.2020, 07:52
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by abrenoch View Post
I am trying to make a 'new crawler job' script, but the 'var myCrawlerJob = job;' line to get the added job doesn't seem to work. it always results in an undefined variable.
Appears to be working fine. Can you post the script here or provide more information it?
Reply With Quote
  #1568  
Old 27.10.2020, 09:36
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
Default

@Dockel: It would prefer "color picker" within the already existing edit dialog

@abrenoch: please provide your script and also what trigger you are using
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1569  
Old 27.10.2020, 09:43
Dockel Dockel is offline
JD Legend
 
Join Date: Feb 2020
Posts: 664
Default

Quote:
@Dockel: It would prefer "color picker" within the already existing edit dialog
Sorry, I do not know what that means, but I assume, whatever you will build will be good.
__________________
Aktuelles Windows
Reply With Quote
  #1570  
Old 28.10.2020, 03:18
abrenoch abrenoch is offline
JD Alpha
 
Join Date: Apr 2010
Posts: 21
Default

Quote:
Originally Posted by Jiaz View Post
@abrenoch: please provide your script and also what trigger you are using
Here is the code I am fiddling with:

Code:
// Trigger required: "New Crawler Job".
var myCrawlerJob = job;
function log(content) {
  writeFile(JD_HOME + "/log.txt", JSON.stringify(content) + "\r\n", true);
}
log(Date.now())
log(myCrawlerJob)
That is the same trigger I am using. If I pass something like "**External links are only visible to Support Staff** (but it could be anything), I only ever get this output:

1603847718298
undefined

Per the help section, it seems like I should be getting something:
// ========= Properties for the EventTrigger 'New Crawler Job' =========
var myCrawlerJob = job;

I'm just trying to test things at this point

Last edited by abrenoch; 28.10.2020 at 03:28.
Reply With Quote
  #1571  
Old 28.10.2020, 10:41
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
Default

Working fine here. Have you made sure to set the trigger to "New Crawler Job"?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1572  
Old 28.10.2020, 11:53
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by abrenoch View Post
// ========= Properties for the EventTrigger 'New Crawler Job' =========
var myCrawlerJob = job;
It is a sandbox object, and as such you cannot 'stringify' it. You have to use the corresponding object methods to access the listed properties and then write them to a file.
Reply With Quote
  #1573  
Old 28.10.2020, 13:45
abrenoch abrenoch is offline
JD Alpha
 
Join Date: Apr 2010
Posts: 21
Default

Quote:
Originally Posted by Jiaz View Post
Working fine here. Have you made sure to set the trigger to "New Crawler Job"?
Yup, absolutely certain. Event tried removing that job and remaking it. I do have some updates available so I'll try again after applying those.

Quote:
Originally Posted by mgpai View Post
It is a sandbox object, and as such you cannot 'stringify' it. You have to use the corresponding object methods to access the listed properties and then write them to a file.
I was trying that as well... But when I tried to 'getSourceUrl' I would only ever get a "cannot call method getSourceUrl of undefined". I'll try again after updating, but I had that thought as well and calling a method didn't seem to help.
Reply With Quote
  #1574  
Old 28.10.2020, 14:14
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
Default

@abrenoch: no updates because no issues. Just tried and worked fine on first try.
Can you show a screenshot of the eventscripter extension, table/list of scripts
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1575  
Old 28.10.2020, 23:55
abrenoch abrenoch is offline
JD Alpha
 
Join Date: Apr 2010
Posts: 21
Default

Quote:
Originally Posted by Jiaz View Post
@abrenoch: no updates because no issues. Just tried and worked fine on first try.
Can you show a screenshot of the eventscripter extension, table/list of scripts


Sending the url to this forum post, for example, yielded a couple triggers but always an 'undefined' job:

1603922086067
undefined
1603922097095
undefined

Thanks for the help!
Reply With Quote
  #1576  
Old 29.10.2020, 11:58
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
Default

As mgpai already explained, you cannot JSON.stringify on the job as it is no Object/Map that supports JSON conversion.
You have to write out the fields you are interested in
Quote:
/* === CrawlerJob === */
/* ========= Methods =========*/
var myList = myCrawlerJob.getArchivPasswords();
var myString = myCrawlerJob.getOrigin();
var myString = myCrawlerJob.getPassword();
var myString = myCrawlerJob.getSourceUrl();
var myString = myCrawlerJob.getText();
var myString = myCrawlerJob.getUUID();
var myBoolean = myCrawlerJob.isAssignJobID();
var myBoolean = myCrawlerJob.isDeepAnalysisEnabled();
myCrawlerJob.setAssignJobID(myBoolean);
myCrawlerJob.setDeepAnalysisEnabled(myBoolean);
myCrawlerJob.setPassword(myString);
myCrawlerJob.setText(myString);
__________________
JD-Dev & Server-Admin

Last edited by raztoki; 29.10.2020 at 12:38.
Reply With Quote
  #1577  
Old 30.10.2020, 05:56
dereks10 dereks10 is offline
Vacuum Cleaner
 
Join Date: Sep 2020
Posts: 16
Default

Hey guys, ive been looking to enable some sort of multi directory duplicate check, just like it is now, except multiple directories ( 2nd - 3rd ssd , external hdds ) etc. I searched a good while, came upon this thread, and have searched it. Didnt find a final solution, anyone point me in the right direction?
Thanks.
Reply With Quote
  #1578  
Old 30.10.2020, 08:06
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by dereks10 View Post
... ive been looking to enable some sort of multi directory duplicate check, just like it is now, except multiple directories ( 2nd - 3rd ssd , external hdds ) etc.
JD checks if a file exists, only in the save location/folder of the link (not the sub-folders).

Scanning/matching entire contents of multiple drives using a script is resource intensive and time consuming. By the time a dupe is detected, the file would have triggered captcha and/or will be partially downloaded.

The download locations are usually limited to certain folders. Optimal method would be to use a script to specify/scan only those folders and disable the links.

Such a script can be found HERE.
Reply With Quote
  #1579  
Old 04.11.2020, 16:56
GreenXIII GreenXIII is offline
Bandwidth Beast
 
Join Date: Mar 2013
Posts: 145
Default

Hi. I've been wondering if it's possible to tidy up my download list with a script.

Is it possible to combine multiple downloaded links, with the same package name and same download directory, into a single package?

I've got over 127,000 downloaded links that I keep to avoid adding duplicates. If I could combine packages and sort files within them from newest to oldest, it would look much more organized.

EDIT: if matching both package name and directory is too much, I'd say grouping by directory and using its name as the package name would suffice.

Last edited by GreenXIII; 04.11.2020 at 19:56.
Reply With Quote
  #1580  
Old 04.11.2020, 17:06
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
Default

@GreenXIII: should be possible , maybe mgpai can help you with it He's the script master of the universe
__________________
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 12:51.
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.