Regular Expression Help

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
garak1357
Newbie
Newbie
Posts: 4
Joined: November 11th, 2013, 10:33 am

Regular Expression Help

Post 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?
Last edited by garak1357 on November 12th, 2013, 9:50 pm, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Regular Expression Help

Post by shypike »

Just use two accepts :)
Accept 1080p
Accept 720p
Leaving out the brackets will probably also solve the issue.
garak1357
Newbie
Newbie
Posts: 4
Joined: November 11th, 2013, 10:33 am

Re: Regular Expression Help

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Regular Expression Help

Post 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.
garak1357
Newbie
Newbie
Posts: 4
Joined: November 11th, 2013, 10:33 am

Re: Regular Expression Help

Post 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!
Post Reply