There was a problem loading the comments.

What is the Packagizer?

Support Portal  »  Knowledgebase  »  Viewing Article


What is the Packagizer?

The packagizer is a feature which lets you modify parameters of given links & packages based on already given parameters.
It is most commonly used to:

  • modify filenames (e.g. remove parts of them) based on existing filename/packagename/download-directory and so on
  • set download directory based on given filename/packagename/download-directory and so on

You will find the Packagizer under Settings -> Packagizer

Note: Packagizer rules will only affect newly added links!
Nothing will change for existing links in downloadlist and LinkGrabber!

Example URL used in all simple examples down below: http://cdn8.appwork.org/speed.zip
The examples will work even if the file behind that link is not downloadable anymore!

Overview

 


Simple example: Change filename with wildcards


Simple example: Change filename with RegEx (regular expression)


Simple example: Modify filename depending on downloadurl

The following rule will append "JDAwesome_" to all files from source "appwork.org" which are online.


Final filename of this example will be: JDAwesome_speed.zip" instead of "speed.zip".
You can test your Packagizer rules by utilizing the "Test" functionality on the bottom of your rule where a blue "play button" is located.

Please note that in order to to more complex filename/package name modifications, some knowledge about regular expressions is required.
Useful online tool to learn regular expressions: regexone.com
Useful online tool for testing regular expressions: regex101.com


Dynamic variables

In the above screenshot you can see some of the available dynamic variables which you can use as placeholders for your new custom filenames/packagenames.
You will find some of these in the context menu (screenshot) and a complete list here:

Name Explanation
<jd:append> -> this placeholder will be replaced by previous value where the placeholder is being used in
<jd:prop:KEY> -> this placeholder reads out an internal property of the downloadlink itself. properties are plugin specific and there are plans that plugins can return a list of supported properties that can be used here
<jd:indexof> -> this placeholder will be replaced by number of index of the downloadlink within its package. first link will be 1, second link will be 2 and so on. It's just the index within the package!
-> will be replaced in real time
<jd:subfolderbyplugin> -> some plugins support recursive folder support. if supported by plugin, then the downloads will have same directory structure like shown in browser (e.g. Google Drive).
<jd:env:KEY> -> this placeholder will be replaced by KEY environment variable of your system
-> will be replaced in real time
<jd:orgfilename> <jd:orgfilename:number>

-> this placeholder will be replaced by original filename or matching group(number) of filename pattern

What sounds like "oiginal filename" is ment to be the "filename which the plugin sets when no user interaction is involved".
This can differ from what you'd get when downloading the same file via browser but should be the same in most cases.

<jd:packagename> -> this placeholder will be replaced by the current package name
-> will be replaced in real time
<jd:orgfiletype> <jd:orgfiletype:Pattern> -> this placeholder will be replaced by the file extension of the file or the match of the given pattern
<jd:orgfilenamewithoutext> -> this placeholder will be replaced by original filename without file extension
<jd:hoster:number> -> this placeholder will be replaced by the matching group(number) of downloadurl pattern or the host itself if number is -1
<jd:source:(number)pattern> -> this placeholder will be replaced by the match of sourceurl pattern. with number you can specify which sourceurl to process
<jd:simpledate:simpleDateFormatString>

-> this placeholder will be replaced by time formatted with simpleDateFormatString, see: docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
-> will be replaced in real time

<jd:orgpackagename>
-> this placeholder will be replaced by the original package name

Plugin specific properties (<jd:prop:KEY>)

These work the same as dynamic variables but are different depending on the website you're trying to download from.
Not all plugins provide such properties but here are some examples of which information those could provide: "uploader" (name of the uploader of content), "date" (date when content was published) and so on.
You can use such properties like this:

<jd:prop:PROPERTYID> e.g. <jd:prop:uploader> or <jd:prop:date>

You can use these properties the same way as <jd:orgfilename> is used in the above screenshot.
At this moment there is no nice user accessible plugin specific list of properties available as this is still on our TODO list.
In the meantime you can find plugin specific dynamic tags/properties by searching our support forum.
If you need more properties for a specific plugin, contact our support.

 

How to find all / more plugin specific properties?

At this moment there is no list of those properties.

If you are able to read code, you can get the JDownloader source code to find all places where plugin properties are set.

Look for places where a property is set on a DownloadLink object, for example:

item.setProperty("nameOfProperty", "valueOfProperty");

Example Java class where this is used: jd.plugins.hoster.DirectHTTP
Note that properties can also be set on other items but in the Packagizer you can typically only access those which are set on DownloadLink items.

The above example means that using <jd:prop:nameOfProperty> will return valueOfProperty.

 


Import / Export Packagizer rules

On the bottom right corner, you will find two buttoms to import/export packagizer rules.
You can also export individual rules by selecting them --> Rightclick --> Export


Packagizer via myjd / headless mode

Myjd doesn't have any GUI for packagizer settings.
You can however, use a normal JD installation with GUI, add your packagizer settings and then simply copy them voa advanced settings to your headless JD.
See Settings --> Advanced Settings --> Search for PackagizerSettings
Packagizer rules will be exported as .packagizer files.


More Packagizer examples?!

You will find more examples for Packagizer rules in this help article category and also by searching for "Packagizer" (german = "Paketverwalter") in our support forum.

Depending on your needs, this Support Category will get updated to contain more useful examples in the future!


Troubleshooting

My Packagizer rule does not work - what can I do?

Testing the rule
Inside the rule creation window there is a text field on the bottom with a blue "play button" icon on the left side.
This can be used to put in links and test, if your rule matches.
If it does, you will see a green checkmark in the left side column of the "Packagizer Rule Test" window.

My Packagizer rule is working according to the Packagier Rule Test window but it is still not working - what can I do?

If you're adding links via the "Add links" dialog:
On the bottom of that window there is a checkbox setting called "Information overwrites packagizer rules" - make sure to disable that.
Screenshot:

If your rule is still not working now, your rule is most likely setup in a way that it doesn't do anything or that it sets information that is already set so you can't see it working.
Essentially this means that chances are high that you've setup the rule in a wrong way.
If you can't figure it out you can always contact our support.


Related Articles


On-Premise Help Desk Software by SupportPal