SabRage

Got a program that plays well with SABnzbd? Share it here!
Post Reply
Yarbles
Newbie
Newbie
Posts: 36
Joined: January 25th, 2008, 6:51 am

SabRage

Post by Yarbles »

SabRage is yet another Sabnzbd/Newzbin automatic TV show downloader, and just for fun I've also thrown TVRage into the mix.

SabRage uses C# so it requires .NET. You also need a running Sabnbd configured to use a Newzbin account and a (free) TVRage account.

How does it work? SabRage uses your personalized TV schedule RSS feed from TVRage, if it's not already in your SAB queue, History or TV download folder it searches newzbin yadda yadda...

See the readme for more info on settings and usage.

Image

What's it good for? Downloading new episodes of current shows that are posted within 24 hours of airing. SabRage has limited support for "daily" shows like Letterman, The Colbert Report, etc. It basically always looks for "yesterday's" show, by date, if TVRage indicates a new episode has aired.

What's it not good for? Getting old episodes or shows that don't routinely get posted within 24 hours after airing.

Why did I write this?

First, as a way to learn C# and Visual Studio.

Second, I wanted something virtually maintenance free. Once SabRage is set up, to start following a show all you have to do is add it as one of your favorites on TVRage. Remove a TVRage favorite and SabRage stops downloading it. Also if you download an episode manually SabRage should detect that you already have the episode. 

Third, I wanted the program to be efficient, both on my computer and the services I use (Newzbin/TVRage).


Running SabRage.exe launches the GUI mode where you can setting things up and/or run the program. It has a simple scheduler and can be set to start automatically in the systray, but I prefer using the Task Scheduler. The Task Scheduler has several major advantages: 1. It doesn't waste resources when SabRage isn't actually doing anything 2. The scheduler is much more flexible and 3. Task Scheduler can wake up a sleeping computer, run the program and then go back to sleep when it's done downloading.

Source files are included. I was going to clean up and comment the code but I got busy and figured if I waited until I got around to that I might never release it. I tired to keep things orderly and well named, but it's my first C#/VisualStudio project and I was learning as I went. The code should compile fine with the free versions of Visual Studio C# or the open source IDE SharpDevelop.

I'm interested in hearing your feedback, but I've been busy and so I might not be able to respond quickly. I've been using it on Vista64 and Windows 7 RC  for about a month without any major issues, but I haven't thoroughly tested it. I recommend you enable SAB's "Don't download duplicates" option in case it goes crazy. There are certain cases where SabRage will download an episode and then not detect it as being downloaded, for example "Patton 360 ..." will be found on Newzbin as "History channel - Patton 360 ..." and sent to Sab, but then SabRage won't recognize it as "Patton 360 ..." when checking downloaded episodes so it will add it again.

One more thing, there is no install but the app settings are stored in a file in \appdata\roaming\Yarbles\SabRage...  in case you want to delete it.

Download: http://drop.io/sabrage
Undisclosedpower
Newbie
Newbie
Posts: 23
Joined: November 12th, 2008, 9:17 pm

Re: SabRage

Post by Undisclosedpower »

First off, props on doing something i've been meaning to do for a LONG time. This app looks and is awesome. But before It replaces hellavcr for me I have a few thoughts.

1) You let people change the search URL for newzbin, I assume that this will let me select the video format of the shows. Problem is that some shows come in both x264 and xvid and I want the x264 version. Maybe we can have a UI to grab the favourite shows from TVRage and allow you to select the format you want to download. If no format is selected, get the first available. (IE I add a new favourite show, but forget to update SabRage)

2) Thanks for giving out your source. I may have a go at implementing feature 1 myself. Would you be interesting it putting a project up somewhere like google code so that people can collaborate and help? What license is your code under? Do you want us to submit patches to you?

Cheers.

UDP.
Yarbles
Newbie
Newbie
Posts: 36
Joined: January 25th, 2008, 6:51 am

Re: SabRage

Post by Yarbles »

Thanks for the response, Undisclosedpower.  :)

In reverse order:

RE: 2) The code is released as public domain. Anyone can do anything they want with it. I won't be able to devote enough attention to be a proper project admin, but like I said anyone is free to do what they want with it, including starting a Sourceforge or Google Code project.

RE: 1) One of my design goals was for SabRage to basically be stateless. It has a basic program config file, but it doesn't keep track of what your shows are, what episodes you have/need, etc. It greatly simplifies things (for both the programmer and the user), but also adds restrictions like no per item search settings.

One non-ideal solution to your problem would be to search for both versions and sort the results by size, since SabRage just grabs the first result. The problem there is if you only want the HD version but it is posted after the SD has been posted and fetched. 

As far as a proper solution. My initial, minimalist, thought is to have a user managed list of exceptional show titles with matching alternative search strings. Just before searching Newzbin, if the current show is on the exception list the alternative search sting is substituted. I'd have to look into it more, particularly on the best way to implement the list, and perhaps the overhead would make a more general solution that allowed more features preferable.
Yarbles
Newbie
Newbie
Posts: 36
Joined: January 25th, 2008, 6:51 am

Re: SabRage

Post by Yarbles »

Update v1.0.0.1:

- Works with Newzbin's new RSS authentication requirement
- Replaced timer based scheduler with a Task Scheduler based scheduler (Vista+ only)
- Reads the logfile into the log window at startup


A couple of notes if anyone is using this.

Because of the changes Newzbin made you now have to give the program your NB username and pwd.

The new scheduler is much smarter than the old one. If there are items not found on newzbin it reschedules at the user defined time interval.  If all of your items have been downloaded it reschedules itself to run the next time new content might be available. That's usually 3 AM Pacific Time (when TVRage updates) unless you are using the "Check Today's feed" @ x PM option, in which case it will check at x PM. The "Done FTD" (Done For The Day) button ignores any remaining unfound items and reschedules as if they are all found.

You can find the scheduled event SabRage uses in the Task Scheduler and change any options (except the security options, otherwise SabRage might not be able to make changes to the task), like don't wake the PC to run, don't run when on battery power, add your own triggers, etc.

For programmers:
The new scheduler code uses the Vista/Win7 new TaskScheduler API (2.0). I've included a DLL which wraps the COM API, since there is no native managed library.  If anyone wants to hack this release to work with XP, then I know specifically the lines that set and get the task's time trigger label are unsupported in the earlier TS API. There may be other issues too. The .dll included to interface with the API supports both, it's just a matter of restricting the code to the 1.0 API feature set.
Yarbles
Newbie
Newbie
Posts: 36
Joined: January 25th, 2008, 6:51 am

Re: SabRage

Post by Yarbles »

Update V1.0.0.2
- The scheduler now works with XP.
Yarbles
Newbie
Newbie
Posts: 36
Joined: January 25th, 2008, 6:51 am

Re: SabRage

Post by Yarbles »

It looks like Newzbin is messing with their feed authentication. If SabRage stopped finding results then here's a quick fix:

Run SabRage, Click on Settings and the click on Newzbin Search Settings. Paste -->  &hauth=1  <---- to the end of the settings string URL. Make sure there is no space in the URL.
User avatar
dyscrase
Newbie
Newbie
Posts: 12
Joined: February 25th, 2010, 6:39 pm
Contact:

+1 xp

Post by dyscrase »

Yarbles wrote: Update V1.0.0.2
- The scheduler now works with XP.
I've been reading along [today] hoping there was an alternative to the V/w7 task scheduler 2.0 for XP (Pro SP3).  Yay! I shall try your wonder in WMware WS for impact then hopefully joy on sabnzbd+ machine :)

Was it *another* tv site that inspired your tvrage rss?
Yarbles
Newbie
Newbie
Posts: 36
Joined: January 25th, 2008, 6:51 am

Re: +1 xp

Post by Yarbles »

dyscrase wrote: Was it *another* tv site that inspired your tvrage rss?
It was TVRage's personalized RSS feeds that inspired this program. I was using a perl script based on a script called prenominalNZB, it used TVRage's API, but not the feeds. When I found TVRage's feeds I figured they were already doing most of the work, so why not take advantage of it. Not only does TVRage keep track of when new shows air, but it manages your subscriptions to shows and almost every TV report on Newzbin links to the TVRage page where subscribing to the show is a click away.
Last edited by Yarbles on March 20th, 2010, 11:53 am, edited 1 time in total.
Post Reply