JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 01.05.2017, 10:51
GiuseppeKK
Guest
 
Posts: n/a
Default Help me express this rule on the unpacker

Hi,
I don't understand how to set the file unpacker to use these rules:

If an archive contains only 1 file and no directories: don't create a subdir (unpack to the main directory)

If an archive contains only 1 directory and 0 files on the first level: don't create a subdir (unpack to the main directory)

In any other situation: 1 or more file / direcotry: create a subfolder in the main directory.
Reply With Quote
  #2  
Old 02.05.2017, 12:40
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

Please know that the rules in 'Extraction Settings' only apply to the subfolder created by JDownloader.
JDownloader does not remove folders from archive! It will extract the content to the given destination.

That said, JDownloader is not able to to what you want to achieve. It does not alter the archive structure.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 02.05.2017, 22:01
GiuseppeKK
Guest
 
Posts: n/a
Default

Maybe I have expressed my question unproperly.

When unpacker starts I don't want it to modify my arkive. I whish it extract to the destination folder following the rules I have written on my message

If there is only one file, extract to the destination folder (I prefeer to be unique for all 1 file archives)

If the archive contains more than one file/directory, create a subfolder.

The original archive should not be modified
Reply With Quote
  #4  
Old 02.05.2017, 22:26
GiuseppeKK
Guest
 
Posts: n/a
Default

It actually does not work manually.

I have uploaded my configuration screenshot

I have set a common extraction path. The flag "create subfolder based on package name" is set.

I have selected "create a subfolder if at least 1 file in the archive.

0 folders

and 0 folders 0 files (I don't undestand this settings, is there an help file ?)

But JDOWNLOADER is I manually select the archive it unarchive in the folder where is locaded the file I have manually selected.
Attached Images
File Type: png Extractor.png (142.8 KB, 4 views)
Reply With Quote
  #5  
Old 03.05.2017, 09:40
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

On your Screenshot in Settings, you have <jd:packagename> tag in folder. Please remove it, that way you ALWAYS append the packagename
__________________
JD-Dev & Server-Admin
Reply With Quote
  #6  
Old 03.05.2017, 22:37
GiuseppeKK
Guest
 
Posts: n/a
Default

Still does not work.

I found the file in download dir and not in the one that should be created.

Also, where I could find the doc of the settings ?
Reply With Quote
  #7  
Old 04.05.2017, 08:46
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

I'm sorry but there is no doc for the settings. The short text should be easy enough to understand. Maybe the translation isn't good enough. Did you try to change language to english?

I can take a look via Teamviewer if you want, contact us via support@jdownloader.org
Your screenshot shows that you set to use subfolder with name of package ONLY if root directory of archive contains at least 1 file.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #8  
Old 06.05.2017, 21:09
GiuseppeKK
Guest
 
Posts: n/a
Default

Hi,
I have already changed the GUI language to english.
Lets try to ged rid of the situation just here then we will try a teamviewer connection.

The setting:
Enabled: True
Extract archive after each download: True
Extract archive to the following folder: E:\_Extracted

Should mean: after each archive has been downloaded extract to the root DIR of the "E:\_Extracted" folder.

Then the other settings

Create subfolder: True

Create a subfolder only if the following condition are true.
Now it comes the problem: which is the logic operation of the followin 3 settings ? They seems concatenated condition.

Lets try some examples:

1) At least 1 file: true
AND at least 1 folder: false
AND at least 1 file and 1 folder: false

Archive which contains
onlyonefile.txt

creates a subfolder.

2) At least 1 file: true
AND at least 1 folder: true
AND at least 1 file and 1 folder: false

Archive which contains
onlyonefile.txt

DOES NOT create a subfolder.

Archive which contains
onlyonefile.txt
onlyonedir/

Creates a subfolder

Archive which contains
onlyonedir/

DOES NOT create a subfolder.

3) At least 1 file: true
AND at least 1 folder: true
AND at least 1 file(s) or 1 folder(s): true

Unable to decode this scenario. How could we have

onlyonefile.txt

and the third condition triggers if we must have
At least 1 file: true
AND at least 1 folder: true

????
Reply With Quote
  #9  
Old 06.05.2017, 22:00
GiuseppeKK
Guest
 
Posts: n/a
Default

Things I have discovered so far:

- The rules are connected via OR, in English and Italian translation you use the form "AND at least" which let you think to a STRICT AND rule

- %PACKAGENAME% is a nonsense when you unpack manually. It is %ARCHIVENAME% the correct one.

- When Unpacking manually the "EXTRACT IN" extraction folder is not considered, ARCHIVE is unpacked inside the folder where it resides.

- SUBFOLDER creation via rules accept only the last part of the path and not a whole one.

- You have to restart JDownloader to let configuration changes work.

Last edited by GiuseppeKK; 06.05.2017 at 22:02.
Reply With Quote
  #10  
Old 22.05.2017, 10:22
GiuseppeKK
Guest
 
Posts: n/a
Default

Hi,
I still have problem with the 3 rules for SUBDIR creation. We could avoid TeamViewer Connection with a simple explanation of their logic: are they concatenated by AND, OR, or is there any other logic inside ?
Reply With Quote
  #11  
Old 22.05.2017, 11:47
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

Quote:
Originally Posted by giuseppekk View Post
- the rules are connected via or, in english and italian translation you use the form "and at least" which let you think to a strict and rule
They are connected via AND
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 22.05.2017 at 12:09.
Reply With Quote
  #12  
Old 22.05.2017, 11:48
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

Quote:
Originally Posted by GiuseppeKK View Post
- %PACKAGENAME% is a nonsense when you unpack manually. It is %ARCHIVENAME% the correct one.
Yes, because in manual extraction, there are no packages to work with/get name from
__________________
JD-Dev & Server-Admin
Reply With Quote
  #13  
Old 22.05.2017, 11:50
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

Quote:
Originally Posted by giuseppekk View Post
- when unpacking manually the "extract in" extraction folder is not considered, archive is unpacked inside the folder where it resides.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #14  
Old 22.05.2017, 11:50
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

Quote:
Originally Posted by GiuseppeKK View Post
- SUBFOLDER creation via rules accept only the last part of the path and not a whole one.
I'm sorry but can you please provide an example? I don't understand
__________________
JD-Dev & Server-Admin
Reply With Quote
  #15  
Old 22.05.2017, 12:05
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

Quote:
Originally Posted by GiuseppeKK View Post
- You have to restart JDownloader to let configuration changes work.
It is enough to switch settings tab to some other settings to *save* the changes.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #16  
Old 22.05.2017, 12:10
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

Quote:
Originally Posted by GiuseppeKK View Post
Hi,
I still have problem with the 3 rules for SUBDIR creation. We could avoid TeamViewer Connection with a simple explanation of their logic: are they concatenated by AND, OR, or is there any other logic inside ?
AND
__________________
JD-Dev & Server-Admin
Reply With Quote
  #17  
Old 23.05.2017, 06:14
GiuseppeKK
Guest
 
Posts: n/a
Default

Please delete this duplicated post

Last edited by GiuseppeKK; 23.05.2017 at 06:18.
Reply With Quote
  #18  
Old 23.05.2017, 06:15
GiuseppeKK
Guest
 
Posts: n/a
Default

Thanks for having merged the various topic: a last one before I look at the various answers (note: haven't your replied "OR" on yesterday evening and now it is "AND" ? :-)

Well, if you start unpacker on a group of files and you receive an:

"extraction of xxxxx.rar failed - (select here if you don't want to see this message again)"

The whole unpack queue halts for input. There should be a selectable timeout as you can start the queue before going to bed only to discover once you wake up, it is stuck at the very first file with errors.

Last edited by GiuseppeKK; 23.05.2017 at 06:31.
Reply With Quote
  #19  
Old 23.05.2017, 06:29
GiuseppeKK
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
AND
Logic AND (OR) or boolean AND ?

Yesterday I have set the first rule to "only if the root archive contains 0 files". This would stop creating subfolders until you have only directories. Instead the other rules where applied as if they where concatenated by OR and not by boolean AND.
Reply With Quote
  #20  
Old 23.05.2017, 06:37
GiuseppeKK
Guest
 
Posts: n/a
Default

A last one on this topic:

In the main file list once a file has been extracted, the status column shows:

"Extraction OKMyfilename.zip"

It should have a Colon and a Space in the middle:

"Extraction OK: Myfilename.zip"

(I have searched for few minutes for filenames starting with OK :-)
Reply With Quote
  #21  
Old 23.05.2017, 09:22
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

The condition is *at least*, so 0 will make a rule be ignored
Code:
if ( number of files < at least x files) return
if (number of folders < at least x folders) return
if (number of files+folders < at last x files or folders) return
append subfolder
__________________
JD-Dev & Server-Admin

Last edited by raztoki; 23.05.2017 at 10:05. Reason: fixed bbcode
Reply With Quote
  #22  
Old 23.05.2017, 09:24
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

Quote:
Originally Posted by GiuseppeKK View Post
A last one on this topic:

In the main file list once a file has been extracted, the status column shows:

"Extraction OKMyfilename.zip"

It should have a Colon and a Space in the middle:

"Extraction OK: Myfilename.zip"

(I have searched for few minutes for filenames starting with OK :-)
Will be fixed with next core update
__________________
JD-Dev & Server-Admin
Reply With Quote
  #23  
Old 02.06.2017, 09:33
GiuseppeKK
Guest
 
Posts: n/a
Default

The last week of downloads has messed my extraction and download directory. I have created a wrong set of rules. We need to be on this topic again.

Quote:
Originally Posted by Jiaz View Post
The condition is *at least*, so 0 will make a rule be ignored
Code:
if ( number of files < at least x files) return
if (number of folders < at least x folders) return
if (number of files+folders < at last x files or folders) return
append subfolder

In your code: what does mean "return" ?

1 --> Create the subdir ?
2 --> Evaluate the next rule ?

And... this time I kindly request the following example rules which should trigger the creation of a subdir:

1) AT LEAST "1 file AND 1 DIR" or (AT LEAST) "2 files" or (AT LEAST) "2 directories"

2) AT LEAST "1 file AND 1 DIR" or (AT LEAST) "2 files" or (AT LEAST) "1 directory"

Last edited by GiuseppeKK; 03.06.2017 at 00:10.
Reply With Quote
  #24  
Old 06.06.2017, 16:09
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

Return means 'quit the method'/do not append any subfolder

The rules work with AND, so currently it is not possible to create such a complex OR rule

The rule evaluator works like

(number of files < at least x files) AND (number of folders < at least y folders) AND (number of files+folder < at least z files or folders)
x,y,z are the settings
__________________
JD-Dev & Server-Admin
Reply With Quote
  #25  
Old 10.06.2017, 05:57
GiuseppeKK
Guest
 
Posts: n/a
Default

Please,
could you add a way in the archive extractor to express the extraction logic using a formula other than the fixed set of rules ?

I think having 2 variables: NUMDIR, NUMFILES, 3 operators (OR, AND, NOT), 6 comparators ">" "<" "<>" "=" ">=" "<=" and parenthesis ().

Last edited by GiuseppeKK; 10.06.2017 at 06:01.
Reply With Quote
  #26  
Old 10.06.2017, 06:18
GiuseppeKK
Guest
 
Posts: n/a
Default

Also,
please note that the unpacker returns a generic "extraction fails" error without any reason if the unpacker can't unpack a package, this does not let me debug why some valid archives are not being unpacked.

Last edited by GiuseppeKK; 10.06.2017 at 08:27.
Reply With Quote
  #27  
Old 11.06.2017, 13:51
GiuseppeKK
Guest
 
Posts: n/a
Default

... and if you can't add such formula, to me would suffice a fourth button: "OR at least [x dir and x files]" after the last one.
It would be nice if files and dir could have separate values.
Reply With Quote
  #28  
Old 16.06.2017, 14:06
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

__________________
JD-Dev & Server-Admin
Reply With Quote
  #29  
Old 16.06.2017, 14:07
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

Quote:
Originally Posted by GiuseppeKK View Post
Also,
please note that the unpacker returns a generic "extraction fails" error without any reason if the unpacker can't unpack a package, this does not let me debug why some valid archives are not being unpacked.
Please provide logfiles when this happens.
For example when it is unsupported RAR5 archive this may happen
See here for RAR5 support, https://board.jdownloader.org/showthread.php?t=71069
__________________
JD-Dev & Server-Admin
Reply With Quote
  #30  
Old 22.10.2017, 14:20
GiuseppeKK
Guest
 
Posts: n/a
Exclamation

Hi,
I have just locked the english version so I discovered the italian one is wrong and misleading:

"al massimo" should be changed to "almeno" in both "folders" an "folders + files" setting.

This is the reason of my confusion.
Reply With Quote
  #31  
Old 23.10.2017, 08:48
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,519
Default

Thanks, will be updated with next core update
__________________
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 11:40.
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.