JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #2241  
Old 09.06.2022, 13:22
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

Quote:
Originally Posted by xefeg View Post
If a 2GB file is downloaded and has a folder. Will it be able to split the folder which contants the file into parts? lets say 900MB.part1.rar....?
I'm sorry but what do you mean by *and has a folder*? when you split files of multipart archives, then chances are high that you will break manual/automate extraction because the parts no longer match for the complete archive. you first have to extract/merge the individual parts to be able to extract the whole multipart archive.
It would make more sense in extracting the archive and then compress it again to multipart with max 900 mb parts
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2242  
Old 09.06.2022, 13:54
xefeg xefeg is offline
JD Alpha
 
Join Date: Oct 2019
Posts: 24
Default

Quote:
Originally Posted by Jiaz View Post
I'm sorry but what do you mean by *and has a folder*? when you split files of multipart archives, then chances are high that you will break manual/automate extraction because the parts no longer match for the complete archive. you first have to extract/merge the individual parts to be able to extract the whole multipart archive.
It would make more sense in extracting the archive and then compress it again to multipart with max 900 mb parts
Extracting takes time which is why I can't do that. I need to split because Size>1GB is too big for uploads. So, the 1 file I downloaded has to be automatically split once its downloaded finished.
Reply With Quote
  #2243  
Old 09.06.2022, 13:58
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

@xefeg: why is 1gb too big? where do you upload too that does not accept/support larger files?
As I said, spliting the files without taking care of the whole archive will break manual/auto extraction of the whole archive.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2244  
Old 09.06.2022, 14:05
xefeg xefeg is offline
JD Alpha
 
Join Date: Oct 2019
Posts: 24
Default

Quote:
Originally Posted by Jiaz View Post
@xefeg: why is 1gb too big? where do you upload too that does not accept/support larger files?
As I said, spliting the files without taking care of the whole archive will break manual/auto extraction of the whole archive.
When ever I download a file, ABC.rar with Jdownloader, it is saved inside a folder ABC which means Jdownloader automatically creates a folder which contains the file ABC.rar inside.
After the download is completed, I split the folder ABC with WinRAR with filesize 999 MB and upload.

I just want this process to be automatic using a script or something if Jdownloader supports.
Reply With Quote
  #2245  
Old 09.06.2022, 14:20
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

@xefeg: you can disable the ABC subfolder, see https://support.jdownloader.org/Know...ackage-feature
You will have to ask mgpai for a script for eventscripter that copies file and splits it (with some 3rd party command line tool on your system).
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2246  
Old 09.06.2022, 14:37
xefeg xefeg is offline
JD Alpha
 
Join Date: Oct 2019
Posts: 24
Default

Script Request - Rename or Replace filename after download, if the string is found

1. Downloaded filename is delete_OriginalFilename.rar
2. If string 'delete' is found, replace it with 'A'
3. Else do nothing
4. Output = A_OriginalFilename.rar

Last edited by xefeg; 09.06.2022 at 14:53.
Reply With Quote
  #2247  
Old 09.06.2022, 15:01
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

@xefeg: can also be done via Packagizer, see https://support.jdownloader.org/Know...paketverwalter
filename - contains - delete_*
filename - set - <jd:orgfilename:1>
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2248  
Old 09.06.2022, 16:08
xefeg xefeg is offline
JD Alpha
 
Join Date: Oct 2019
Posts: 24
Default

Quote:
Originally Posted by Jiaz View Post
@xefeg: can also be done via Packagizer, see **External links are only visible to Support Staff**...
filename - contains - delete_*
filename - set - <jd:orgfilename:1>
Thanks a lot sir, it Worked,
However, if the file is OriginalFilename_delete.rar
It seems to remove all the strings. How to remove if the unwanted string is at the end.
Please help.

eg. OriginalFilename_delete.rar
Output = OriginalFilename.rar
Reply With Quote
  #2249  
Old 09.06.2022, 16:23
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,494
Default

Quote:
Originally Posted by xefeg View Post
eg. OriginalFilename_delete.rar
Output = OriginalFilename.rar
Code:
if > filename > contains : *_delete*
then set > file name > <jd:orgfilename:1><jd:orgfilename:2>
Reply With Quote
  #2250  
Old 09.06.2022, 16:24
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

@xefeg
Quote:
filename - contains - ^delete_(.+)
filename - contains - ^(.+)_delete\.[a-z0-9]{3}$
enable regex checkbox on right side
create two rules, one will remove leading, the other will remove trailing *delete*

@or use the super nice solution from mgpai BIG THUMBS UP!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2251  
Old 09.06.2022, 16:26
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 69,593
Default

@mgpai
Side question:
Do you have any kind of current overview of all your scripts?
Just wondering because we do not have a good place for them but you could e.g. put them into a github library which I think you did sometimes in the past.
__________________
JD Supporter, Plugin Dev. & Community Manager
JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist

Reply With Quote
  #2252  
Old 09.06.2022, 16:35
StefanM's Avatar
StefanM StefanM is offline
JD VIP
 
Join Date: Oct 2020
Posts: 472
Default

Quote:
Originally Posted by mgpai View Post
Code:
/*
    Export link info
    Trigger : Downloadlist contextmenu button pressed
    Customizze downloadlist context menu > Add a noew "Eventscripter Trigger" button > Rename it to "Export link info"
*/

if (name == "Export link info") {
    var file = JD_HOME + "/" + Date.now() + ".tsv";
    var data = [];

    dlSelection.links.forEach(function(link) {
        data.push([getPath(link.downloadPath).extension, link.name, link.bytesLoaded, link.downloadPath, link.url].join("\t"));
    })

    if (data.length) {
        writeFile(file, data.join("\r\n"), true);
    }
}
Just saw this script.
Thanks!

Created that EventScripter button and renamed it to 'Export link info'
Installed the script
I can click that button, confirmed permission.
But what about that file, the script should create?


Did I forget something?

Last edited by StefanM; 09.06.2022 at 16:39.
Reply With Quote
  #2253  
Old 09.06.2022, 16:39
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

@StefanM: trigger must be set to "Downloadlist contextmenu button pressed"
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2254  
Old 09.06.2022, 16:44
xefeg xefeg is offline
JD Alpha
 
Join Date: Oct 2019
Posts: 24
Default

Quote:
Originally Posted by Jiaz View Post
@StefanM: trigger must be set to "Downloadlist contextmenu button pressed"
Thank you mgpa

Btw, on the filename can we add two arguments? *delete*, *newdelete*
Or we need to create two rules?
Reply With Quote
  #2255  
Old 09.06.2022, 16:56
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

@xefeg
Quote:
^(.*?)_(?:delete|newdelete)(.*)$
and enable regex checkbox
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2256  
Old 09.06.2022, 17:04
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,494
Default

Quote:
Originally Posted by StefanM View Post
But what about that file, the script should create?
A file in 'timestamp.tsv' format will be created in JD folder. Example (j:\Apps\Jdownloader\1654782759265.tsv)
Code:
var file = JD_HOME + "/" + Date.now() + ".tsv";

It is also possible to create a script which can export the entire list using a different trigger, for example on toolbar button press, without having to select any links.
Reply With Quote
  #2257  
Old 09.06.2022, 17:25
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,494
Default

Quote:
Originally Posted by StefanM View Post
Adding (random) delays between requests and/or downloads
A. Only possible with downloads or while feeding origin links.
B. Eventscripter does not have access to crawling process.
C. Can use sleep. (Will post example script when @Jiaz adds the new method)

One more option which can help with rate limiting is reduce the linkchecker/linkcrawler threads in advanced settings. Default is 4 and 12. (I use 4 for both)

The best approach is to control it at the plugin level, as suggested by @Jiaz/@psp.

Quote:
Originally Posted by Jiaz View Post
B.) @mgpai: you could use packagaizer hook here to add sleep/wait in linkcrawler
Does it help with rate limit? I thought that is triggered only after crawling/collectiing process is completed.
Reply With Quote
  #2258  
Old 09.06.2022, 17:32
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

Quote:
Originally Posted by mgpai View Post
Does it help with rate limit? I thought that is triggered only after crawling/collectiing process is completed.
Yes, because the packagizer script then *blocks* the linkcrawler thread
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2259  
Old 09.06.2022, 17:34
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 69,593
Default

Quote:
Originally Posted by Jiaz View Post
Yes, because the packagizer script then *blocks* the linkcrawler thread
Until now no one has needed this.
Maybe it's better to wait until a real use case exists.
__________________
JD Supporter, Plugin Dev. & Community Manager
JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist

Reply With Quote
  #2260  
Old 09.06.2022, 17:42
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,494
Default

Quote:
Originally Posted by pspzockerscene View Post
@mgpai
Side question:
Do you have any kind of current overview of all your scripts?
Just wondering because we do not have a good place for them but you could e.g. put them into a github library which I think you did sometimes in the past.
No. Some are in github/gitlab repos, but most of them are in the forum.

Since we cannot post any urls or upload any files in the forum, perhaps JD team can host an official repo to share scripts, rules etc.
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 17:28.
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.