JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #2201  
Old 04.06.2022, 12:55
StefanM's Avatar
StefanM StefanM is offline
JD VIP
 
Join Date: Oct 2020
Posts: 472
Default Script for exporting result of 'Copy information' to an csv-file?

When you export data using 'copy information' in the context menu, you can define, what you want to copy to clipboard.

E.g: {type};{name};{filesize};{path};{url}
Note: Using TAB instead of ; as separator can be helpful, when you are dealing with file or folder names containing ;

Then you can copy the clipboard contents e.g. to Excel.


Jiaz recommended that I should ask here, if a script for that already has been written or could be written.
And - as mentioned above - the separator should be TAB, because ',' and also ';' can be part of file or folder names, which would mess up the Excel sheet.
Reply With Quote
  #2202  
Old 04.06.2022, 14:53
Mydgard Mydgard is offline
Fibre Channel User
 
Join Date: Jan 2011
Location: Germany
Posts: 115
Default

As i am bad like hell in programming ...

Dunno if someone posted here ... but does anyone as an eventscripter script to disable CRC Check for any unpacked files? So CRC only for zipped/rared Files where a CRC Error would prevent unpacking?

Thx
Reply With Quote
  #2203  
Old 04.06.2022, 14:54
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

@StefanM: In case you want to experiment by yourself, see
https://board.jdownloader.org/showpo...&postcount=102
https://board.jdownloader.org/showpo...&postcount=794
https://board.jdownloader.org/showpo...6&postcount=19
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2204  
Old 04.06.2022, 14:56
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

@Mydgard: why you want to disable CRC for non archives? why disable it all?
I'm sorry but currently it's not possible to disable it on *per file basis*.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2205  
Old 04.06.2022, 15:20
Mydgard Mydgard is offline
Fibre Channel User
 
Join Date: Jan 2011
Location: Germany
Posts: 115
Default

Quote:
Originally Posted by Jiaz View Post
@Mydgard: why you want to disable CRC for non archives? why disable it all?
I'm sorry but currently it's not possible to disable it on *per file basis*.
Psp said it should be possible with event scripter ...

And i want to do that because my Download HDD is @100% while CRC Checking all those Rapidgator links ...
Reply With Quote
  #2206  
Old 04.06.2022, 15:27
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,495
Default

Quote:
Originally Posted by Mydgard View Post
... script to disable CRC Check for any unpacked files ...
Code:
/*
    Remove hashinfo from non-archive files
    Trigger: Packagzier Hook
*/

!link.crawledLink.archive && link.setProperty("HASHINFO", null);


Code:
/*
    Disable hashcheck
    Trigger: Packagzier Hook
*/

state == "BEFORE" && linkcheckDone && !link.crawledLink.archive && link.setProperty("ALLOW_HASHCHECK", false);

Last edited by mgpai; 04.06.2022 at 16:04. Reason: Script replaced.
Reply With Quote
  #2207  
Old 04.06.2022, 15:29
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

@Mydgard: Thanks for the feedback. He is right, I had to check source. There is a property that can be set "ALLOW_HASHCHECK" to false, so no hashcheck is done on the file.
Better wait for mgpai to help with a script that set this property, eg a script that set the property after linkcheck.
But it's okay that a HDD is working/high IO Load during check because the whole file has to be read for checking. a HDD may work and is not designed to have as less reads as possible
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2208  
Old 04.06.2022, 15:30
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

@mgpai: don't change HASHINFO property as it might get updated/set again during normal plugin work. Better set the named property , see my previous post
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2209  
Old 04.06.2022, 16:12
Mydgard Mydgard is offline
Fibre Channel User
 
Join Date: Jan 2011
Location: Germany
Posts: 115
Default

@mgpai / Jiaz:

Thx, tried this:

/*
Remove hadinfo from non-archive files
Trigger: Packagzier Hook
*/
state == "BEFORE" && linkcheckDone && !link.crawledLink.archive && link.setProperty("ALLOW_HASHCHECK", false);

Trigger is "Hook für Paketverwalter".

Started a RG Link ... after download a CRC Check occurs ...

So either the script isnt working, i did a mistake or the new script works only for newly added RG links? That would be bad as i have a huge amount of RG links in JD2.

Thx
Reply With Quote
  #2210  
Old 04.06.2022, 16:17
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

@Mydgard: The rule is only applied on *Packagizer*, so during adding of new links. In case you want to modify existing links in list, you will need a different script that loops through all links and modifies this property for all non archive links. Please wait for mgpai for further help with this
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2211  
Old 04.06.2022, 16:28
Mydgard Mydgard is offline
Fibre Channel User
 
Join Date: Jan 2011
Location: Germany
Posts: 115
Default

Ah okay thx Helpful for new links as well yes but mainly needed for existing links ...
Reply With Quote
  #2212  
Old 04.06.2022, 16:29
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

@Mydgard: I'm sure mgpai will be able to write a wonderful script for you
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2213  
Old 04.06.2022, 16:41
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,495
Default

Quote:
Originally Posted by Jiaz View Post
...you will need a different script that loops through all links and modifies this property for all non archive links ...
No trigger required (since it's to be run only once). Add the script and click 'Test Run' in the script editor menu to execute it.

Code:
/*
    Disable hashcheck for non-archive files
    Trigger : None
*/

getAllDownloadLinks().forEach(function(link) {
    !link.finished && link.hashInfo && !link.archive && link.setProperty("ALLOW_HASHCHECK" , false);
})

getAllCrawledLinks().forEach(function(link) {
    link.hashInfo && !link.archive && link.setProperty("ALLOW_HASHCHECK" , false);
})
Reply With Quote
  #2214  
Old 04.06.2022, 16:48
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

@mgpai: maybe we add new trigger type (manual) with a button *run* besides? your opinion on this?
or all *manual* scripts are available automatically in rightclick context menu. new type "context menu entry", so it automatically adds to context menu?
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 04.06.2022 at 16:50.
Reply With Quote
  #2215  
Old 04.06.2022, 17:27
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,495
Default

Quote:
Originally Posted by StefanM View Post
Note: Using TAB instead of ; as separator can be helpful, when you are dealing with file or folder names containing ;
You can use "TAB" or any other character as separator in 'copy information' menu command.

Quote:
Originally Posted by StefanM View Post
Jiaz recommended that I should ask here, if a script for that already has been written or could be written.
This thread has several scripts which can be used to format/export data. @Jiaz has listed some of them. You can also use scripts to perform dupe checks from within JD instead of exporting and comparing them manually.
Reply With Quote
  #2216  
Old 04.06.2022, 17:30
Mydgard Mydgard is offline
Fibre Channel User
 
Join Date: Jan 2011
Location: Germany
Posts: 115
Default

@mgpai: will i get a end message or something similar? have 10877 links in jd2 actual ...

Not sure how long it will take to run?
Reply With Quote
  #2217  
Old 04.06.2022, 17:34
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,495
Default

Quote:
Originally Posted by Jiaz View Post
@mgpai: maybe we add new trigger type (manual) with a button *run* besides? your opinion on this?
or all *manual* scripts are available automatically in rightclick context menu. new type "context menu entry", so it automatically adds to context menu?
A button outside of the editor may not be needed as they are run (mostly) only once, at the time of adding them.
Reply With Quote
  #2218  
Old 04.06.2022, 17:39
StefanM's Avatar
StefanM StefanM is offline
JD VIP
 
Join Date: Oct 2020
Posts: 472
Default

Quote:
Originally Posted by mgpai View Post
You can use "TAB" or any other character as separator in 'copy information' menu command.
Yes, I have been using TABs all the time, as I know that.
I just wanted to point out to other readers here, that - if they do it that way - they should prefer using TABs.

And of course, any script should use TABs as well.

This is what I wanted to say.
Reply With Quote
  #2219  
Old 04.06.2022, 17:44
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,495
Default

Quote:
Originally Posted by Mydgard View Post
@mgpai: will i get a end message or something similar? have 10877 links in jd2 actual ...

Not sure how long it will take to run?
The script does not display any message, but changes will be applied almost immediately. Just try downloading a non-archive file which has a checksum.

You can use this to get the count of links which for which hashcheck has been disabled

Code:
/*
    Show hascheck disabled count
    Trigger : None
*/

var count = 0;


getAllDownloadLinks().forEach(function(link) {
    link.getProperty("ALLOW_HASHCHECK") == false && count++;
})

getAllCrawledLinks().forEach(function(link) {
    link.getProperty("ALLOW_HASHCHECK") == false && count++;
})

alert("Hash check is disabled for " + count + " links");
Reply With Quote
  #2220  
Old 04.06.2022, 17:46
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,495
Default

Quote:
Originally Posted by StefanM View Post
Yes, I have been using TABs all the time, as I know that.
It's clear now.
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 00:50.
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 - 2023, Jelsoft Enterprises Ltd.