Page 1 of 1

Regular Expression Help

Posted: November 11th, 2013, 10:40 am
by garak1357
My skill with regular expressions is limited. I'd like some help to craft one that would help me out. Often the RSS feeds I get have mixed 720p and 1080p resolutions. Sometimes one is available while the other is not or both are available. I'm trying to craft a regular expression that will allow me to download the highest resolution available for a given episode. The best I've been able to do is:

Require S04
Accept re:(1080p|720p)

This sorts it to only download season 4 episodes of 1080p and 720p resolutions. I need to be able to get it to download one or the other but not both. Somehow the logic of how to do this in a regular expression is escaping me. Any solution for this?

Re: Regular Expression Help

Posted: November 11th, 2013, 1:31 pm
by shypike
Just use two accepts :)
Accept 1080p
Accept 720p
Leaving out the brackets will probably also solve the issue.

Re: Regular Expression Help

Posted: November 11th, 2013, 11:53 pm
by garak1357
I actually tried doing that. When I set it up with two accepts like that, the files listed in the filter show both a 1080p and a 720p version of the same episode. That is why I discounted it. Are you suggesting that once an accept is triggered, no further matches will be made for that episode? I'll give you a real life example of what I'm talking about. Below is the filtered RSS feed using the filter:

Requires S07
Accept 1080p
Accept 720p

* 2 The.Big.Bang.Theory.S07E06.The.Romance.Resonance.720p.WEB-DL
* 2 The.Big.Bang.Theory.S07E05.The.Workplace.Proximity.720p.WEB-DL
* 2 The.Big.Bang.Theory.S07E04.The.Raiders.Minimization.720p.WEB-DL
* 1 The.Big.Bang.Theory.S07E04.The.Raiders.Minimization.1080p.WEB-DL.DD5.1.H.264
* 2 The.Big.Bang.Theory.S07E04.720p.HDTV.X264-DIMENSION

Notice that on episode 04 there is a 1080p episode listed and a 720p episode listed after it runs through the filter. Is that just an anomaly and the 720p version will not actually be downloaded? This is more than a little confusing to me.

Re: Regular Expression Help

Posted: November 12th, 2013, 1:49 pm
by shypike
Your method and mine will both accept the 720p AND the 1080p.
You'll need either the future release 0.8.0 or use a front-end like SickBeard.

Re: Regular Expression Help

Posted: November 12th, 2013, 9:44 pm
by garak1357
Ahh, okay. I'll wait for the 0.8.0 release to set up my filtering the way I'm wanting to do it. I had thought I was just missing some kind of logic as I'm not use to regular expressions. Thanks for looking into this problem with me. The SABnzbd software has made dealing with regular newsgroup downloads much easier than it ever has been in the past. I really appreciate all the work everyone has done to program and support it. Thanks guys!