Knowledgebase:
Predefined rule: Adopt folder structure
Posted by pspzockerscene psp, Last modified by pspzockerscene psp on 03 May 2021 03:46 PM

Packagizer predefined rule: Adopt folder structure

If enabled, JDownloader will automatically adjust the download path when crawling files/folders from supported cloud folder services such as Google Drive or, mega.nz or mediafire.com.
However there are some things to keep in mind in order to make this feature work properly.
What you have to do also depends on whether you're adding links to a "normal" JDownloader installation with GUI or via myjdownloader/myjd browser extension.

JDownloader with GUI

1. Make sure that "Subfolder by package name" is disabled via Settings -> General -> Download Folder -> Browser

2. In case you're adding links via "Add links dialog" (not via clipboard), you will additionally have to make sure that the following checkbox inside the "Add links dialog" is disabled:
"Information overwrites packagizer rules"
Screenshot:


MyJDownloader / MyJDownloader Addon

1. Go to Settings -> General -> Default download directory -> Browser (folder icon on the right side) -> Disable "Subfolder by package name"

2. When adding links either via myjdownloader interface or via browser extension, make sure that the checkbox "Information overwrites packagizer rules" is disabled!

Screenshot myjdownloader webinterface:

Screenshot myjdownloader browser addon:


The resulting package names and why they make sense

The package names you get depend on the used crawler plugin so they're not (yet) consistent for all services.
Also it may look somewhat chaotic in JD because JD only has one package level (= no "sub-packages") so you will besically get one package for every folder path resulting in a lot of packages but the download paths will be fine!
Let's say you're adding an URL which leads to the following folder structure:

/rootFoldername/subfolder1/somefile1.txt
/rootFoldername/subfolder2/somefile2.txt
/rootFoldername/subfolder2/somefile22.txt
/rootFoldername/subfolder3/subfolder1/someOtherFile.txt
                                      ^^ note that this file is in a folder named "subfolder1" but it's one level deeper than the other "subfolder1"!

Now "somefile2.txt" and "somefile22.txt" will go into one package with the path [yourBaseDownloadPath]/rootFoldername/subfolder2 but the name  of this package could be either just subfolder2 or _rootFoldername_subfolder2 or in some cases also _rootFoldername_subfolder2_.
This is not a bug as no matter what the package name is at the end, the most important thing is that the download paths are correct so that in the end you'll get the same folder structure on your HDD as in the cloud folder you've added.
This also depends on the cloud service itself!
Some will allow the user to always see the complete path and some will only show the path of the folder you're currently in

Why does it make sense to have the complete folder path as package name? Sometimes it is very long!
Well as said the complete folder path isn't always used as package name - often it is just the last folder name (= the name of the folder in which there are files e.g. for /rootFoldername/subfolder1/somefile1.txt, the file could go into a package named "subfolder1").
Having the complete path inside the package names makes more sense because if you take the above example, using only the name of the last folder, you would get two packages both named subfolder1 but with different download paths set and containing different files .e.g:
subfolder1 --> Contains file "somefile1.txt" With download path [yourBaseDownloadPath]/rootFoldername/subfolder1
subfolder1 --> Contains file "someOtherFile.txt" With download path [yourBaseDownloadPath]/rootFoldername/subfolder3/subfolder1
--> As you may guess, this could be confusing vs. having the complete path set as package name.

Why can't I have the slash character (/) in package names?
Some characters are currently not allowed in package names so they'll be replaced by underscore "_".

Why do some package names start- and/or end with an underscore?
Because as stated above, slashes are not allowed in package names and thus get replaced by underscores.



Attachments 
 
 add_links_dialog_overwrite_packagizer_rules_unchecked.png (33.89 KB)
 myjd_browser_addon_add_links_dialog.png (26.94 KB)
 myjd_webinterface_add_links_dialog_overwrite_packagizer_rules_disabled.png (131.95 KB)
(2 vote(s))
Helpful
Not helpful