User(s) browsing this thread: 1 Guest(s)
regex to exclude in Library.xml
|
|
05-15-2012, 05:50 PM
|
|||
|
|||
|
regex to exclude in Library.xml
Hello,
I am trying to exclude with regex as the title suggests. For example, <exclude name=" REGEX "> I am unable to get this working. The YAMJ wiki states its working, but doesn't really say how. Are there any special delimiters you should use to differentiate from normal exclusions? Simple things seem to work, but when I use the negotiation sign ^, ends the string with #i and such it fails. It is also a bit unclear to me if I am to use \\ or single \ for special characters. Finally, the regex is matched against the full path and filename right? If someone knows these things, I would appreciate some clarification. My main goal is to exclude all files not ending ".rar". Thanks |
|||
|
05-15-2012, 06:34 PM
|
|||
|
|||
|
RE: regex to exclude in Library.xml
Are you going for rar playback? And just remove the file extensions from the properties file.
|
|||
|
05-15-2012, 06:58 PM
|
|||
|
|||
|
RE: regex to exclude in Library.xml
Well, I want a llink setup with rar files in one library and everything that's not in one. Sure you can add exclusions for every filetype and get the librarys working. But I thought I would be a nicer solution to do it with a regex, and more complete. Additionally I have a irritating part01, part02, ... exclusion which could also pretty easy be written better with a regex, and so on. I am just wondering for the ground rules so that I can get my small things going.
|
|||
|
05-15-2012, 07:02 PM
|
|||
|
|||
|
RE: regex to exclude in Library.xml
1) It's java regex, so that may help you
2) It's held in a string, so you will need to escape special characters with \ Try this "^(?!.*(rar$))" if you want to add additional extensions "^(?!.*(rar$|avi$|mkv$))" |
|||
|
05-15-2012, 07:16 PM
|
|||
|
|||
|
RE: regex to exclude in Library.xml
Also there is no need for it. Grabbing lunch give me 30 minutes rat support was totally rewritten. You are trying the old way.
|
|||
|
05-15-2012, 07:19 PM
|
|||
|
|||
|
RE: regex to exclude in Library.xml
Hmm, that doesn't give me any found videos. It came to my mind, does it mather that I use filename.scanner.useParentRegex=true?
And btw, you mean exactly like this right? <exclude name="^(?!.*(rar$))"/> |
|||
|
05-15-2012, 07:32 PM
|
|||
|
|||
|
RE: regex to exclude in Library.xml
no parentregex is fine I use all this with rar. Lets start from the beiging. what files do you want to use with llink and what files dont you want to use with it?
|
|||
|
05-15-2012, 07:53 PM
|
|||
|
|||
|
RE: regex to exclude in Library.xml
For example:
exluded: Z:\Video\Test\Die Hard 2\diehard2.rar not excluded Z:\Video\Test\12 Angry men\angry.avi I am trying: ^((?!rar).)*$ But its not working. |
|||
|
05-15-2012, 08:00 PM
(This post was last modified: 05-15-2012 08:01 PM by halfelite.)
|
|||
|
|||
|
RE: regex to exclude in Library.xml
Code: .*(?:(?<!part\d\d\d|part\d\d|\d)\.rar|\.part0*\.rar) should should get most of it for you |
|||
|
05-16-2012, 06:23 PM
(This post was last modified: 05-16-2012 11:43 PM by clarkieeee.)
|
|||
|
|||
|
RE: regex to exclude in Library.xml
Thanks for your help, finally got it working. Messed up what I wanted to exclude in previous post as well. This is for a Llink & YAMJ setup, so I want to exclude all filetypes that are not .rar for the Llink library.
This is what I am going for: Code: <exclude name="\.(?!rar$)\w*$,part[2-9]\.rar$,part(0[2-9]|[1-9][0-9])\.rar$,part(00[2-9]|0[1-9][0-9]|[1-9][0-9][0-9])\.rar$,tmp/,temp/,RECYCLER/,RECYCLE.BIN/,-subs,subtitle,/subs,subs,/subtitle,sample/"/>This works quite fine to exclude all other files than .rar Code: \.(?!rar$)\w*$One last problem, you cannot use "," in eg. \d{1,2} as its used for separating "blocks" I guess? Well, it's a minor problem. And the wiki, for me it would have saved me alot of work to point out that you don't need to match the whole pathwaystring. And maybe that you can still separate blocks by a ",". EDIT: part\d\d\d wrongly excludes part001, updated to pattern to: part(00[2-9]|0[1-9][0-9]|[1-9][0-9][0-9])\.rar$ , and likewise for part01 and part1 |
|||
|
05-16-2012, 08:32 PM
|
|||
|
|||
|
RE: regex to exclude in Library.xml
Also just make sure you use the newest rar stuff its the easiest. You need mediainfo-rar located here http://www.lundman.net/wiki/index.php/Mediainfo-rar put it in your mediainfo folder and you want to set this property to true mjb.scanner.mediainfo.rar.extended.url=false it will then use mediainfo-rar to pull out all the mediainfo as well as the file names inside the rar to pass to yamj. A lot cleaner then the old yamj/llink way
|
|||
|
05-17-2012, 12:08 AM
|
|||
|
|||
|
RE: regex to exclude in Library.xml
I am using mediainfo-rar and mjb.scanner.archivescan.rar=true as well as mjb.scanner.mediainfo.rar.extended.url=true and the jukebox works, maybe the most important factor.
Are you referring to the old way as the one were you used: filename.scanner.types.suffix.RAR=?playall=1 and mjb.extensions=AVI DIVX MKV WMV M2TS TS RM QT ISO VOB MPG MOV MP4 M1V M2V M4V M2P TP TRP M2T MTS ASF RMP4 IMG RAR or have something else changed so that you don't need to exclude the part__ rars / have separate librarys for llink/normal any more? |
|||
|
05-17-2012, 12:17 AM
|
|||
|
|||
|
RE: regex to exclude in Library.xml
you dont need to exclude anymore for parts, and if you are a yamj that is somewhat new mjb.scanner.archivescan.rar=true is no longer a valid property it was replaced with mjb.scanner.mediainfo.rar.extended.url=true and the links are no longer RAR=?playall=1. yamj scraps and shows them as http://llink.ip/folder/file.rar/file.mkv so you also need a newer llink but if all is working sounds like you are good. you still need separate if you dont want to play everything with llink
|
|||
|
« Next Oldest | Next Newest »
|

Twitter
Facebook
NMT Wiki
Search
Member List
Help
A-400 [13 May 2013]

regex to exclude in Library.xml





![[+]](images/collapse_collapsed.gif)




![[Image: watched-fanart.jpg]](http://trakt.tv/user/Omertron/widget/watched-fanart.jpg)
