JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 13.07.2017, 20:42
sucr4m sucr4m is offline
Vacuum Cleaner
 
Join Date: Jul 2017
Posts: 15
Default Please help me with packagiser regex rule.

So.. long time JD user here, never really got behind the packagizer. I tried some prolly stupid as hell regex stuff i threw together which didnt work as intended at all but i guess if you know your way around both of those monsters its gotta be easy.

I just want my tv shows to get downloaded/extracted/moved into the right show folder. All shows have "SXXEXX" (example: s07e01) in their file and package name. Since i cant packagize like a big boy im using the kiddo version which works but well.. i have to create one for every single damn show:

you get the idea.

can somebody please be so kind and explain me what i need todo so i can stop creating endless rules and folders by hand? :|

Last edited by sucr4m; 13.07.2017 at 23:36.
Reply With Quote
  #2  
Old 13.07.2017, 21:17
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

you need to tell it how many times to repeat
\d for instance will only pick up 0-9 it wont pick up 00-99+
if you expect at least one or more its \d+
if you expect it for specific character count its \d{countvalue}
for instance \d{2} = 00-99
for instance \d{1,2} = 0-99

for more assistance try _**External links are only visible to Support Staff** place in what you want to match it should highlight as you write your pattern
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #3  
Old 13.07.2017, 22:48
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,290
Default

Your example matches on
s\d+e\d+
and don't forget to enable the regex checkbox
__________________
JD-Dev & Server-Admin
Reply With Quote
  #4  
Old 13.07.2017, 23:35
sucr4m sucr4m is offline
Vacuum Cleaner
 
Join Date: Jul 2017
Posts: 15
Default

its not the match that wasnt working, its everything after that.

I have no idea how to tell it to create -> move it to a folder with the Show name without the SxxExx.xxxxx.xxx.xxxxp.xxx.xx following. It needs to be cut off from the folder. So that in the end my

"Show.name.S02E01.1080p.hsomething.grp" goes into

"x:\tvshows\Show name"

I dont know if its even possible im just assuming there is a way to identify the spot right before the "SxxExx" and cut it.
Reply With Quote
  #5  
Old 14.07.2017, 03:59
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

you will need to use regex
put a listen range () before S\d+E\d+
use dynamic tag (select it via right click function)
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #6  
Old 14.07.2017, 12:29
sucr4m sucr4m is offline
Vacuum Cleaner
 
Join Date: Jul 2017
Posts: 15
Default

Quote:
Originally Posted by raztoki View Post
you will need to use regex
put a listen range () before S\d+E\d+
use dynamic tag (select it via right click function)
so i tried this which at least in the right click -> test package name expression matches and the wildcard picks up everything up to "**External links are only visible to Support Staff** which does seem to cut off the SxxExx but when i actually try it the link grabber just does his thing for files that dont match any rule.

i mean cant you PLEASE just finish this and explain by example? This is far from solved as it is :|

Last edited by sucr4m; 14.07.2017 at 12:37.
Reply With Quote
  #7  
Old 14.07.2017, 12:57
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

package names should not start with /, as we typically strip chars
are you wanting to parse our provided package names or are you wanting to do via returned filename. I would say packagename is the correct way because it will mean _ and . are stripped and you wont have duplicate directories on harddrive (as in series.name and series_name for instance).

rule name: "generic tv"
package name: equals; "(.+)S\d+E\d+.+"; regex checkbox
then set...
Download Directory; "somepath\<jd:orgpackagename:1>"

done

raztoki
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #8  
Old 14.07.2017, 13:23
sucr4m sucr4m is offline
Vacuum Cleaner
 
Join Date: Jul 2017
Posts: 15
Default

Quote:
Originally Posted by raztoki View Post
rule name: "generic tv"
package name: equals; "(.+)S\d+E\d+.+"; regex checkbox
then set...
Download Directory; "somepath\<jd:orgpackagename:1>"

done

raztoki
Package name sure seems the way to go, even though now it does the same thing with (.+)S\d+E\d+.+ as it did with (/.*)S\d+E\d+ and its being ingored by the link grabber which puts it in the default location with the full name. I even tried to put the rull as the first one to execute, still the same.

Controll pic so you can see i did what you said.
Reply With Quote
  #9  
Old 14.07.2017, 13:49
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

works fine with the test links I added. I didn't use contains though I used equals.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #10  
Old 14.07.2017, 14:26
sucr4m sucr4m is offline
Vacuum Cleaner
 
Join Date: Jul 2017
Posts: 15
Default

Okay.. so i did some testing in the wild and from what i can say this works.

IF i:
1 disable the predifined subfolder by packagename rule
+
2 put the regex "(.+)S\d+E\d+.+" on the filename instead of the package name

Which is strange because all my other rules for single tvshows work with 1 BUT i indeed do use the filename in my other rules aswell.

Funny enough even though the file names clearly go by "show.name" with the dot inbetween it replaces the dot with a space. im an idiot. I tested that with a show that had a rule on its own. It indeed puts the dot from the file name into the folder name.

Even with the rule turned off it still puts files that arent tvshows in folders going by the package name.. or well.. the file name without dots.


Soo, of course, it didnt put the files in their own subfolder. Why would i even think that with the rule disabled.
The question is then, why do i need to disable the rule for the generic tvshow rule to work while the other single tv show rules work either way.


D:

okay. I put the rule at the end of the list again re-enabled the subfolder rule.. and now it "works". Needing to have the regex in the file name instead of the package name does put dots in the folder name which is kind of a nogo. Is there a way to read out/see the package name? Or rather, what exactly IS the package name? Im so confused right now.

Last edited by sucr4m; 14.07.2017 at 15:28.
Reply With Quote
  #11  
Old 14.07.2017, 15:16
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

it processes rules based on order in the list. another rule can over ride based on the sequence in which is processed.

no worries

raztoki
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #12  
Old 14.07.2017, 16:24
sucr4m sucr4m is offline
Vacuum Cleaner
 
Join Date: Jul 2017
Posts: 15
Default

well i tried putting the generic tv rule before and after the predifined subfolder by packagename rule, both ways wont work with the regex in the package name. It does work if i disable the subfolder rule. But then i dont get subfolders for every file that isnt a tvshow..


prolly i misstook it with another show that already had a single rule, thats what i get for working and trying to fix my home stuff at once.

so in the end no matter what i do it wont work over package name. Even if i type in the exact show name it wouldnt match the package name, as if i dont even have one. But that cant be either because then the subfolder rule wouldnt work.

Maybe ill try it with a fresh install from JD2 since it seemed to work for you and i cant see anything im doing different.

Last edited by sucr4m; 14.07.2017 at 16:54.
Reply With Quote
  #13  
Old 14.07.2017, 20:02
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,290
Default

New Installation won't help and is not the reason why it doesn't work.

The answer is simple. DON'T use packagename

You can only parse on package name if the plugin sets one! Only very few plugins set a package name. The auto package naming happens AFTER the packagizer rules!
So at the time the rule is being processed, there is no package name to work on.

The simple solution is: Use Filename
__________________
JD-Dev & Server-Admin
Reply With Quote
  #14  
Old 14.07.2017, 20:39
sucr4m sucr4m is offline
Vacuum Cleaner
 
Join Date: Jul 2017
Posts: 15
Default

Well thats good to know, thanks.

For the 'simple' solution though.. if i use the filename is there a way to get the dots and underlines out of my file/folder names? And if its not possible through the packagizer might the event scripter be able todo something like that?

Or am i doomed to keep creating rules for every single tv show im starting to watch? :'<
Reply With Quote
  #15  
Old 15.07.2017, 03:41
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

ohhh I did forget about that, sorry.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #16  
Old 17.07.2017, 20:02
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,290
Default

Please provide some example links, then we can help better if we know what exactly you mean
__________________
JD-Dev & Server-Admin
Reply With Quote
  #17  
Old 18.07.2017, 14:37
sucr4m sucr4m is offline
Vacuum Cleaner
 
Join Date: Jul 2017
Posts: 15
Default

No Problem, i blurred them out before because i thought that might be against some rules sharing links like that.

as you can see the links for tv shows have pretty much all the same pattern.
My idea would have been pretty solid if they had package names without the dots inbetween. I didnt know it only gets generated after the packagizer does his work.

In my show folders i got no subfolders for episodes or seasons so as long as it takes the show name for the folder to throw it in its fine. But im out of ideas.

Couldnt find anythign here or on google even though im really suprised noone else thought of it before. Well hope dies last.

Last edited by Jiaz; 18.07.2017 at 14:42.
Reply With Quote
  #18  
Old 18.07.2017, 14:42
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,290
Default

Filename, contains
(.*?)\.?s\d+e\d+.*
enable regex

set packagename
<jd:orgfilename:1>
__________________
JD-Dev & Server-Admin
Reply With Quote
  #19  
Old 18.07.2017, 14:44
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,290
Default

at the moment it's not possible to remove the dots
__________________
JD-Dev & Server-Admin
Reply With Quote
  #20  
Old 18.07.2017, 14:48
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

the issue is with that you can get directories with . or _ or whitespace thus creates possibilities of duplicates.

catch 22.

raztoki
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]

Last edited by raztoki; 18.07.2017 at 16:45.
Reply With Quote
  #21  
Old 18.07.2017, 16:11
sucr4m sucr4m is offline
Vacuum Cleaner
 
Join Date: Jul 2017
Posts: 15
Default

2015 :'<

goodbye sweet dreams

Last edited by sucr4m; 18.07.2017 at 18:11.
Reply With Quote
  #22  
Old 19.07.2017, 09:46
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by sucr4m View Post
... if its not possible through the packagizer might the event scripter be able todo something like that? ...
You can use event scripter to remove/replace superfluous characters and also set package names.
Reply With Quote
  #23  
Old 19.07.2017, 12:10
sucr4m sucr4m is offline
Vacuum Cleaner
 
Join Date: Jul 2017
Posts: 15
Default

Please teach me, master :<
Reply With Quote
  #24  
Old 19.07.2017, 14:05
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Script -> Link
Reply With Quote
  #25  
Old 19.07.2017, 15:24
sucr4m sucr4m is offline
Vacuum Cleaner
 
Join Date: Jul 2017
Posts: 15
Default

Quote:
Originally Posted by mgpai View Post
Script -> **External links are only visible to Support Staff**...
First i thought it wouldnt work but when i went through the script for the 100th time i actually understood i need to put the packagename back into the download directory instead of <jd:orgfilename:1>.

You are actually creating the package name instead of JD if a match is given it right? Thats way better than trying to have the folder renamed AFTER the download.. which was what i was thinking off.

Well thank you very much kind stranger.

One more question: if i would ever encounter something else in the filename like lets say a "-" or w/e i would just need to add it inside "[._]" right? Something like "[._-]" ? Or would it need some kind of divider?

edit: or even a "US" or "2017". Its okay to just add it to be replaced by a space since folder names cant have spaces at the end. I just tried [._US] which worked for the example link i dug out but logic tells me adding a 2017 behind that wouldnt work. Maybe [2017._US] would do, i just dont have a link with 2017 after the show name and before the SxxExx right now. D:

Its really damn rare but it comes up from time to time

Last edited by sucr4m; 19.07.2017 at 15:41.
Reply With Quote
  #26  
Old 19.07.2017, 17:46
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by sucr4m View Post
.. i actually understood i need to put the packagename back into the download directory instead of <jd:orgfilename:1> ...
You would not need any additional packagizer rules if you have the default "create subfolder by package" rule enabled.

Quote:
Originally Posted by sucr4m View Post
.. if i would ever encounter something else in the filename like lets say a "-" or w/e i would just need to add it inside "[._]" right? Something like "[._-]" ..
Yes. It is used to specify individual characters/letters (not words) which need to be replaced. They can be in any order. Each occurance of the character will be replaced with space. To remove words, you can use a different regex directly in the packagizer. You can find me in JD chat if you need any help with it.
Reply With Quote
  #27  
Old 20.07.2017, 18:04
sucr4m sucr4m is offline
Vacuum Cleaner
 
Join Date: Jul 2017
Posts: 15
Default

To wrap this up for others to find, i had a little chat with mgpai yesterday and he gave me the solution to the last could-be problem.

The right rule must be above the left one to make it work.
Those rules work in combination with the Event scripter... script mgpai wrote.

Now all files with SxxExx (and with US or 2017 coming right after) will be placed on my another drive placed in a folder with the file name without dots and cut right before the SxxExx. After JD sets the download directory the package gets renamed back to the file name so its easier to spot in the download list of JD.

mgpai had it working with a single rule doing the same. You are free to try but for some reason wouldn't work for me.


So all downloaded tv shows go into a folder with their name automatically. Which is especially nice if you have a kodi/plex/emby setup at home or just like your files sorted.

Thanks to raztoki, Jiaz and mgpai for making this possible.

Last edited by sucr4m; 20.07.2017 at 18:33.
Reply With Quote
  #28  
Old 20.07.2017, 18:28
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,290
Default

Thanks for the feedback! You should either attach the images to your post or export the rules and attach them

Yes, mgpai is very talented with eventscripter and also good with packagizer
__________________
JD-Dev & Server-Admin
Reply With Quote
  #29  
Old 20.07.2017, 19:11
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

I know people use filebot todo the task of organising (moving/renaming/etc)
maybe that could be solution for you also.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #30  
Old 20.07.2017, 21:27
sucr4m sucr4m is offline
Vacuum Cleaner
 
Join Date: Jul 2017
Posts: 15
Default

eh, why use third party when JD is perfectily fitting my needs?

Edit: and i said that before knowing that filebot is 10 bucks atm.. Im using JD for as long as i can think, prolly for as long as its actually out.. so id rather have you guys have it.

Last edited by sucr4m; 20.07.2017 at 21:44.
Reply With Quote
  #31  
Old 21.07.2017, 07:36
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

seems to cost money for windows10 if you go through the windows app store
its open source program though, so install yourself _**External links are only visible to Support Staff** source code and plugins _**External links are only visible to Support Staff**
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #32  
Old 23.07.2017, 05:28
augur augur is offline
DSL Light User
 
Join Date: Feb 2015
Posts: 30
Default

Thanks for the link to filebot, I might have used that when I first looked for an automatic sorting program.

Instead I downloaded and configured sickbeard which works for tv shows. Sickbeard is more limited in function but does a better job of tracking episodes. All it does is run on my server 24/7 and then I dump all the tv shows in to a single landing folder on the server. I open it's web interface on my main pc and trigger a manual sort and it quickly moves all the files into the kodi compatible folder heirarchy. And since it gets its info from tvdb the same as kodi does any auto-created folders [e.g. Castle (2009)] are 100% compatible for kodi scraping.

I've so far got 161 shows added. After the automated sorting (i.e. Manual Post-Processing) the best feature is that I can easily see if I have any episodes missing.

And did I mention it is free.
Reply With Quote
  #33  
Old 23.07.2017, 05:36
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

I'm aware of sickbeard, just thought it was more so designed for usenet (primary) and torrents (secondary) as auto downloader & organiser.

raztoki
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #34  
Old 24.07.2017, 05:07
augur augur is offline
DSL Light User
 
Join Date: Feb 2015
Posts: 30
Default

That's true, and it generates an error message for the log once a day telling me I haven't configured any NZB/Torrent providers.

The organiser part was the best I found for bulk moving to kodi compatible folders. Two clicks of the mouse and everything in the landing folder gets sorted. The fact it autoupdates listings from thetvdb.org is very nice icing on top.
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 01:32.
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.