#1
|
|||
|
|||
Packagizer to exitloop once condition is matched
how to exit filter once condition is found.
Say I need to download a few eBooks and would like to assign each book base on it title to go into separate category as <Package Name> So the ebook title contains 'birds' then assign <Package Name> = '__Book Of Animals' Then End and Exit at that filter. What I'm experience is although it maches 'birds' but it continue down the list of remain filters and match second time with <File Type> is pdf,epub,mobi. because of this now it reassign <Package Name> = '___eBooks' instead of '__Book Of Animals' <Condition Name> = _Book Of Animals if <File Name> contains (birds|elephant) [x]RegExp then <Package Name> = __Book Of Animals ... <Condition Name> = _eBooks if <File Type> is pdf,epub,mobi [x]RegExp then <Package Name> = ___eBooks |
#2
|
||||
|
||||
You can not exit after the first matching, it matches all rules in order of sequence.
The best solution within the current design framework is to order them in a fashion that they can't overwrite. so that would be generic rules first and then specific rules last. or use another method of adding links in which you can specify the package name & save path. 'directory/folder watch? which then you don't have to rely on package customiser.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#3
|
|||
|
|||
@raztoki
thanks dev, not familiar with the meaning of 'directory/folder watch' yet, i'll read up on that and comeback. have you guys ever considered adding exitloop option at some point? my rational is the reverse of you explained. have all the specific rules at the top if those conditions not met then assign unknown generic ebooks to general ebooks folder. I want to have the similar rule for Audio and Video and Documents as well. Is there a workaround for this? All Audio files goto audios folder but audio with known Artist go to that artist folder? and so on with Directors for Video, Authors for Documents? |
#4
|
||||
|
||||
I have thought about the need previously but each time I could solve by placing rules in correct order. When it comes to it package customiser can't be perfect even with exit condition. It could still have the same outcome of false positive, so order is king in respects to this.
Maybe alternative solution, 3rd party software out there to move/place/rename content, post download maybe this would work better as you could analyse content based on multiple conditions. for memory filebot? quick google shows: its not free anymore, and post on reddit mentions 'Free alternative to Filebot ' && 'I found Filebot, theRenamer, and Media Center Master', not sure if that would work for you outside of this software.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#5
|
|||
|
|||
Quote:
A better option would be to use a script (Javascript) with packagizer hook in the Eventscripter extension, where you can control the exit accurately. It is also more convenient to search/add/remove keywords. |
#6
|
|||
|
|||
This sounds promising. Downloaded eventscripter ext. Where should start? Example scripts please.
|
#7
|
||||
|
||||
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#8
|
|||
|
|||
thanks too all, will seek help from @mgpai at EventScripter
|
#9
|
||||
|
||||
still believe you can do it with standard package customiser, without exiting after first match. your generic rule has file extension rule (first), add that to all your other rules (specific matches) and just place them below. It should not match more than generic and single specific rule (assuming your regex isn't too broad, or filename of a item doesn't contain say car and animal, eg. 'cobra' or 'mustang' car model and animal) after that which overwrites the first rule resulting in outcome you want. If you do have cobra/mustang issue, even existing wont fix false positive.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#10
|
|||
|
|||
Quote:
in addition, custom eventscripter as an alternative to packagizer is kind of cool. thanks for all the help, learning alot for the last couple of weeks. |
Thread Tools | |
Display Modes | |
|
|