[19. April 2013] A-400 Advanced Network Setup now available | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 [21 Jan. 2013] | A-200/A-210 [10 Aug. 2012]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Post Reply 
regex to exclude in Library.xml
05-15-2012, 05:50 PM
Post: #1
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
Find all posts by this user
Add Thank You Quote this message in a reply
05-15-2012, 06:34 PM
Post: #2
RE: regex to exclude in Library.xml
Are you going for rar playback? And just remove the file extensions from the properties file.
Find all posts by this user
Add Thank You Quote this message in a reply
05-15-2012, 06:58 PM
Post: #3
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.
Find all posts by this user
Add Thank You Quote this message in a reply
05-15-2012, 07:02 PM
Post: #4
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$))"

Visit this user's website Find all posts by this user
Add Thank You Quote this message in a reply
05-15-2012, 07:16 PM
Post: #5
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.
Find all posts by this user
Add Thank You Quote this message in a reply
05-15-2012, 07:19 PM
Post: #6
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$))"/>
Find all posts by this user
Add Thank You Quote this message in a reply
05-15-2012, 07:32 PM
Post: #7
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?
Find all posts by this user
Add Thank You Quote this message in a reply
05-15-2012, 07:53 PM
Post: #8
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.
Find all posts by this user
Add Thank You Quote this message in a reply
05-15-2012, 08:00 PM (This post was last modified: 05-15-2012 08:01 PM by halfelite.)
Post: #9
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
Find all posts by this user
Add Thank You Quote this message in a reply
05-16-2012, 06:23 PM (This post was last modified: 05-16-2012 11:43 PM by clarkieeee.)
Post: #10
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
Find all posts by this user
Add Thank You Quote this message in a reply
05-16-2012, 08:32 PM
Post: #11
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
Find all posts by this user
Add Thank You Quote this message in a reply
05-17-2012, 12:08 AM
Post: #12
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?
Find all posts by this user
Add Thank You Quote this message in a reply
05-17-2012, 12:17 AM
Post: #13
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
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  how to exclude TVDB notorious 4 193 05-18-2013 07:30 PM
Last Post: notorious
  [YAMJ] Could you help me library path hunter69 9 440 04-24-2013 08:19 PM
Last Post: gfb107
  [YAMJ] empty Audio/Video channels added to xml files of existings tv-shows Boba Fett 6 970 04-16-2013 05:34 PM
Last Post: mattty_d2002
  Libarary.xml groupings? dulsin 7 433 03-24-2013 03:24 PM
Last Post: dulsin
  consolidating genres together using genres.xml yannickrose 13 476 03-19-2013 02:12 PM
Last Post: wgstarks
  Plot in movies xml file gets truncated. Legion455 7 573 02-15-2013 10:04 PM
Last Post: modmax
  Rescan and update movie (xml) when .watched is detected Danishdude 6 626 02-08-2013 03:45 PM
Last Post: Danishdude
  autoscan library Dougstar 2 325 01-27-2013 12:11 AM
Last Post: accident
  [YAMJ] Set order in library c-not-k 2 442 01-01-2013 08:06 PM
Last Post: c-not-k
  [YAMJ] Bad info from mediainfo in xml files when I rerun YAMJ VaMPyR 2 486 12-31-2012 03:21 PM
Last Post: modmax

Forum Jump: