JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 21.10.2024, 15:58
wkearney99 wkearney99 is offline
DSL Light User
 
Join Date: May 2024
Posts: 33
Default packagizer make new package option?

There are some situations where I'm using x:\some\location\<jd:packagename> and links from the clipboard where I want each scanned set of results from the clipped URL to go into a separate NEW package even if one already exists in the LinkGrabber list.

There are sometimes URLs that get scanned that pull results from different mirrors, and those scans take time to complete, and often return filenames not the same as others.

Thus if I clip several source URLs in a row it's possible some of the URLs will have names that don't make any sense in the context of multiple, different source URLs. Numeric sometimes.

The workflow here is, copy, copy, copy several URLs, have them scanned and then /sometimes/ change the packagename so that they go into a different folder. When the scanning takes a while too many of the results all get piled into one 'package'.

It'd be nice if there was a way to specify in a packagizer rule to always create a new package, and ignore any exiting package that might already exist in the linkgrabber list.
Reply With Quote
  #2  
Old 21.10.2024, 16:49
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,523
Default

I'am not sure if I completely understood the problem here: Some items get auto merged when you don't want this to happen?

You could try to define a unique package key for each item.
A package key is used internally for package merging.
When each package created via your rule has a unique key, auto merge will not happen for those items.

It is easier for me to help you if you'd post that rule here.
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || 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?
Reply With Quote
  #3  
Old 27.10.2024, 23:56
wkearney99 wkearney99 is offline
DSL Light User
 
Join Date: May 2024
Posts: 33
Default

yes. I have a number of URLs that usually end up in the same directory. When I copy to the clipboard a JD linkgrabber rule recognizes their 'sourceURL contains' and sets the package name and download directory. At which point the scanner looks and finds several mirrors, some of which might take a few seconds to complete.

If I then copy another URL (to the clipboard) the linkgrabber rule puts the new scanned URLs into the same package (as it has not yet been added to the download list).

I have found it convenient to sometimes temporarily leave packages in the linkgrabber view in order to later disable/enable certain URLs from certain mirrors or filehosts. Then add the package to the download list. If the URLs I enabled aren't completing (or are too slow) I can then enable one of the other mirror URLs to get the file.

I tried using a package key but it does not seem to change anything. Any new URLs from the same sourceURL still get added to the same package name if one exists in the linkgrabber view.

If I add a package to the download list JD does NOT combine packages if one with the same name already exists. This is a good thing (for my purposes).

I'm basically looking for the linkgrabber rule to not check to see if a package already exists with the same package name. I get why is IS helpful in most situations. This is why I'm asking it in the context of a matching rule.
Reply With Quote
  #4  
Old 28.10.2024, 12:24
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,523
Default

Quote:
Originally Posted by wkearney99 View Post
If I add a package to the download list JD does NOT combine packages if one with the same name already exists. This is a good thing (for my purposes).
JD doesn't have such a feature yet (thoughh some users asked for it).

Quote:
Originally Posted by wkearney99 View Post
I tried using a package key but it does not seem to change anything. Any new URLs from the same sourceURL still get added to the same package name if one exists in the linkgrabber view.
Please provide real life example URLs for testing.
I can't help you otherwise.
Feel free to send them via private message.
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || 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?
Reply With Quote
  #5  
Old 10.11.2024, 16:39
wkearney99 wkearney99 is offline
DSL Light User
 
Join Date: May 2024
Posts: 33
Default

I did a little extra testing and discovered a mistake on my part. I had been testing this with the Package Key set to <jd:simpledate:dd.MM.yyyy>

That was useless for my purpose, in that it's only using a timestamp for the whole DAY.

When I actually read the documentation, and followed the links for the simpledateformat java strings, I discovered that the Package Key DOES work. Using "<jd:packagename> - <jd:simpledate:yyyy-MM-dd'T'HH:mm:ss>" as a Package Key gets me separate linkgrabber sets.

One problem, though, the date appears to be based on the real-time returning of EACH separate mirrored URLs, not the timestamp when the linkgrabbing started. This is 'better' but it then spreads the scanned URLs across multiple packages as the mirrors slowly come back with their own result.

Is there a variable here that would let me use the sourceURL as part of the Package Key? I tried several variations of <jd:source> but it never parsed that into a value, just the literal <jd:source:1> or whatever else I tried.

Is there a variable that would give me the timestamp of when the linkgrabbing started?
Reply With Quote
  #6  
Old 10.11.2024, 21:37
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,523
Default

Quote:
Originally Posted by wkearney99 View Post
One problem, though, the date appears to be based on the real-time returning of EACH separate mirrored URLs
Also wrong.
The date is just the current date (in a formatted form) obtained runtime at the time when your item gets processed by the Packagizer.
That time is the JVM system time so there is no deeper background to the time value.

Quote:
Originally Posted by wkearney99 View Post
Is there a variable here that would let me use the sourceURL as part of the Package Key?
Yes:
Extract a part of your source URL and then use it inside the package key field, similar to how it is done in the following example where it is used in the filename field:
https://support.jdownloader.org/de/k...in-to-filename
(Yes I know, downloadurl is used here and not source url but that's interchangeable.)

Quote:
Originally Posted by wkearney99 View Post
Is there a variable that would give me the timestamp of when the linkgrabbing started?
Afaik no.
If possible at all, then only using more advanced EventScripter scripts.
EventScripter forum thread:
https://board.jdownloader.org/showthread.php?t=70525
EventScripter help article:
https://support.jdownloader.org/know...event-scripter

...or of course you could also add a timestamp of your choice into the links before you add them to JD aka #?timestamp=yourCustomTimestamp, then evaluate that later similar as described here:
https://support.jdownloader.org/de/k...ame-via-anchor
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || 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?
Reply With Quote
  #7  
Old 11.11.2024, 08:09
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,637
Default

Script to get "JOB_ID" property, which can be used in packagizer.

Code:
/*
    assign job id
    trigger : new crawler job
*/

job.setAssignJobID(true);
Reply With Quote
  #8  
Old 13.11.2024, 00:51
wkearney99 wkearney99 is offline
DSL Light User
 
Join Date: May 2024
Posts: 33
Default

Ok, the complication I seem to be having is how do I use the data in the UI entry fields?

Because if I use <jd:hoster:1> _ <jd:orgfilename> in the comment or the filename field, and use the [play>] button to test... it does not do the substitution for <jd:hoster:1>. orgfilename gets replaced, but not the source. THAT is the problem I'm having. I don't seem to know the right syntax to get some/all/any part of the sourceURL into a field for substitution.

What syntax should I in the UI entry fields to get the JOB_ID? Or is that something that can only be used within an event script?
Reply With Quote
  #9  
Old 13.11.2024, 07:59
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,637
Default

Quote:
Originally Posted by wkearney99 View Post
What syntax should I in the UI entry fields to get the JOB_ID?
Code:
<jd:prop:JOB_ID>
Reply With Quote
  #10  
Old 13.11.2024, 13:01
wkearney99 wkearney99 is offline
DSL Light User
 
Join Date: May 2024
Posts: 33
Default

I had tried that and all I'm seeing in the Test Filters UI is "<jd:prop:JOB_ID>"

Which, I assumed, meant it wasn't being substituted. However, when I saved the rule and let it run, it does get substituted.

It seems like the Test Filters list isn't doing substitutions for all of the possible variables. Some do get processed, like orgfilename, but not others like the ones I've been asking about here.

Bug in Test Filters?
Reply With Quote
  #11  
Old 13.11.2024, 13:01
wkearney99 wkearney99 is offline
DSL Light User
 
Join Date: May 2024
Posts: 33
Default

Meanwhile, for anyone else searching, you need a combination of an Event Scripter that sets a JOB_ID variable and a Packagizer rule that uses it.
Reply With Quote
  #12  
Old 26.11.2024, 02:12
wkearney99 wkearney99 is offline
DSL Light User
 
Join Date: May 2024
Posts: 33
Default

Mark this thread SOLVED
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:41.
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.