Page 5 of 15

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 19th, 2010, 2:27 pm
by markus101
For a PROPER I have no way of determining whether the file on disk is a PROPER or not, so I rely on the fact that the NZB for a proper has already been imported AND that particular episode is not in the queue (since it may have already been added, but the NZB has not been loaded). The only time I delete an episode from disk for replacement with a PROPER is when the config option "downloadPropers" is true, and the above conditions are met (not in queue AND not already imported).

When SABSync comes across a PROPER (and downloadPropers = true) it will look for the item in the Queue and check for a matching NZB file, if neither are found it will set a flag to delete the PROPER, once the file is deleted it will begin the normal process to determine if that episode is still wanted, which unless that season is ignored, or the download quality is not wanted it will download that episode (re-thinking this, I will need to move these checks to above the PROPER check, since it would be possibly to delete a file and then later determine that the season is being ignored or the quality is not wanted). This should not apply to your situation as it appears you are using an XviD RSS feed only.

The only way I can see a PROPER causing an issue would be if you previously caught it downloading an episode you already had again (the PROPER) and then you canceled the download, since it would have deleted the episode on disk to make room for the PROPER. Next time SABSync ran it would find the PROPER and skip it because it was already in the imported NZB folder, but it would try to download the next episode of that name found if it had not already been imported, because the episode was no longer on disk.

Like I said above, SABSync will only delete the episode on disk if the PROPER NZB was not imported, so when you are seeing it skip a PROPER, but trying to download a non-PROPER it could only be caused by the above issue. If you downloaded a PROPER and then later deleted the imported NZB, it would re-download it again because it thinks you don't have the PROPER on disk.

-Markus

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 19th, 2010, 7:55 pm
by markus101
LarzJG wrote: And how do you use the RSS from NZBS.org, I mean in a "smartest setup" way? Since they don't let you generate custom RSS feeds, you can't set them up per show like you can with NZBmatrix. I guess the only way is to add each show to "My Searches" on the site and then use that feed, but their results are limited and with 30-something shows to watch, that would really mean you could miss some unless you run SABsynch fairly regularly.
I run a single setup of SABsync with two feeds, NZBMatrix  - XviD (All shows), NZBs.org - XviD (All Shows). SABSync is designed to only grab shows that you need, I run it every 15 minutes and it works great, I'm also not re-checking the same files over and over, I used Custom NZBMatrix Feeds to get some older episodes, but there is no need to continually scan the same custom feeds over and over, even on busy TV nights you should be able to get away with running SABSync every hour on a single NZBMatrix feed and add in the NZBs.org feed, just in-case NZBMatrix goes down or is slow to update.

With SABSync only getting shows that you are watching is it entirely useless to make it check custom feeds (and a waste of your time), right now if I want a new show, I can create a folder on disk and let SABSync do the work (if i need to get back episodes I can create a custom feed, or for just one or two episodes, download them manually and rename the queue item), with Newzbin it was as easy as clicking download and I was set, since they contained the episode name in the report.

-Markus

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 21st, 2010, 2:02 pm
by LarzJG
Yeah, everything seems to be working right now.

Your point about proper RSS-setup is well-taken, I've switched my setup now and it works just fine. For two days it's run smooth, without a hitch. :)

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 21st, 2010, 2:20 pm
by markus101
Good to hear, I'm also looking to release a new version soon, changing the PROPER check to after it confirms you want that season and quality... just to be safe.

I also thought about quality support a bit more and thought it would be best to be able to set a default download quality for all shows and then tweak for shows that you want in a different format (plus tvnzb.com looks to be dead).
So the new version will check for that specific shows quality and then it will also look for the quality you want for all shows if no show match was found (still can be HD or SD, if it doesn't matter).

I'm also working on improving the GUI, to support the new config options and being able to edit the config files for RSS, Quality and Alias. It will still look pretty basic, but be much more functional.

Still waiting on TVRage to fix their bug, still haven't made better documentation, but I did review the bit on the WIKI and it should help, also log file roll-over is still not implemented.

-Markus

P.S. Thanks Larz :)

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 21st, 2010, 10:54 pm
by markus101
Has anyone had a bug where SABSync adds an invalid NZB to the queue and the queue locks up? The name in the queue is the "scene name".nzb (with spaces), so it's from NZBMatrix, also that is what the log shows. The NZB doesn't get imported, because its not real as far as I can tell, it's added properly the next time SABSync runs, but the Queue is frozen.

This happened two times over the past couple of nights. I assume this isn't a bug with SABSync, but at this point, I have no way of knowing. I've added a debugging line to the next release that will show the download link before it downloads, just to try to track this down.

If anyone else comes across this, please let me know.

-Markus

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 22nd, 2010, 2:34 am
by markus101
SABSync 0.9.5 Released
-(Added) Support for NZBsRus.com
-(Added) Default Download Quality for all shows (downloadQuality in Config), download quality will be checked for a match to that specific show, then the download quality for all other shows if a show match is not found.
-(Added) Support for cleaning (deleting) of log files order than X days (config option deleteLogs)
I have also included the GUI as part of this release.


SABSyncGUI 0.3.5 Released
Support for new config file options in SABSync, editing of RSS, Alias and Quality config files within the GUI. This should virtually eliminate the need to edit the config file manually. Switching tabs in the GUI will save the settings, if you change the filename of a .config file it will create a new file when you switch over to the config edit tab.

Please let me know if you have any issues.

-Markus

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 22nd, 2010, 5:10 am
by G3f
Just to say this addon is probably the best creation since SAB was conceived! Since Newzbin went south its been a royal pain in the ass getting 3 shows a day for the other half. Really saved my ass. What's more than that, is it actually works BETTER.

I would say the only thing i'd improve would be the usability/UI, and possibly some slightly better docs. It's not entirely obvious at a glance what the program does.

The a couple of suggestions for features/improvements if your looking for them:

A way of including shows to sync rather than excluding. My TV drive is 1.5TB, it has a LOT of crap in it most of it i'd never want Synced. Some kind of interface that scans the selected TV folder for shows, then offers a list of shows to include for syncing would make life a lot easier. I've resorted to using multiple feeds presently rather than manually excluding 30+ show folders.

Possibly some kind of integration with Windows scheduled tasks? A couple of options to run every x hours, which then configures/updates a scheduled task for you in the options. Would make it a bit easier to manage.

A 'test' mode, just a way of running it and outputting a list of files that it would have downloaded if it had been for real. Not a huge one really but it could help people get it configured without starting off mass downloads.

Anyway, brilliant brilliant bit of kit!

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 22nd, 2010, 9:43 am
by markus101
Hi,

Thanks for the feedback. The UI isn't much, but better than editing a config file for most people, depending on time I may make it a little easier on the eyes, functionally I'm not sure what I would do to improve it. I agree that the documentation is lacking, at least with the release, there is some on the wiki, but it still isn't the best.

1) SABSync was designed to avoid having to choose what you want to sync and to sync everything except for a list of exclusions, there are a couple ways to make an exclusion list now (or a inclusion list, as a result of quality filter).
    a) Set the downloadQuality to something that will never be found in the NZB Title ie. "thiswillneverbefound" Than for the shows you do want set the Quality in Quality.config to a valid filter "xvid" or "720p" (no quotes).
    b) The opposite of the above, set the downloadQuality in the main config to "xvid" or "720p" and then set a list of shows in Quality.
config to invalid values
    c) Move the shows for things you do not want sync'd to anther folder and do not tell SABSync to check that folder

2) I'm not aware of a way to achieve this, but it does sound interesting, it could be done with a service, but I think that could be more confusing (in the install of the service went badly)

3) A test mode does sound useful, I'll see what I can think of the make that happen, as long as it's not too difficult to accomplish


-Markus

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 22nd, 2010, 11:40 am
by G3f
I think there's a fine line though between making it trouble free downloading i.e sync everything and it being a hinderance. It means every time you add a new show, even if its a couple of episodes just to see what its like, it will start syncing unless you edit some config files to stop it.

I'd say the best solution is like you say to create a separate folder at the moment. But anyway, was just an idea :)

I think there are some command line programs in Windows to handle Scheduled tasks. I think at.exe and schtasks.exe in newer versions. How that would play with UAC I don't know. But I have seen used to good effect in a program called S3 Backup.

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 22nd, 2010, 11:47 am
by markus101
I disagree, typically when I download a show I want it to keep downloading every time it airs, if I decide the show sucks I delete it from disk and SABSync stops downloading the show, if I want it, no more configuration is required. I'm not limited by bandwidth per month (that they seem to check on), so downloading a couple extra episodes isn't a big deal to me.

I think I would rather go for a service than mucking with creating a scheduled task, it's not a big deal to go into scheduled tasks and set one up, but I think it could be more clear that you need to do that to in order to have to periodically check for new shows as there is a lot of questions regarding that.

-Markus

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 22nd, 2010, 1:03 pm
by markus101
Hey,

How does the following look? I'm trying to be as simple as possible and provide all the information required, this follows the flow of the GUI.

Code: Select all

How to Setup and Use SABSync

1) Download and Unzip to the directory of your choice (This is probably already done)
2) Open up either SABSyncGUI.exe or SABSync.exe.config to configure SABSync (The GUI is the preferred method)
	TV Root - Folder or Folders where your TV shows are located. For Example D:\TV or D:\TV;X:\TV
	TV Template - This is the sorting template from SABnzbd's sorting configuration
	TV Daily Template - Sorting template from SABnzbd for Daily shows
	Video Extensions - Extensions that you would like SABnzbd to consider as a TV show (Default: .mkv;.avi;.wmv)
	
	SABnzbd Settings:
	Hostname - IP Address or Host Name of SABnzbd (use localhost or 127.0.0.1 for SABnzbd running on this computer)
	Port - Port for SABnzbd, default SABnzbd port is: 8080
	Username - Username for the WebGUI of SABnzbd
	Password - Password for the WebGUI of SABnzbd
	API Key - APIKey for SABnzbd, available in SABnzbd General Settings
	
	NZB Directory - .nzb Backup Folder from SABnzbd Folder Settings
	Priority - Priority that NZBs shoudl be added to the queue for download (High, Normal, Low)
	RSS Config File - Filename of the file that will contain the RSS Feed URL(s) - Can be left as RSS.config
	Alias Config File - Filename of the file that will contain aliases for TV Shows (Feed name differs from TheTVDb name, see Alias.config for details) - Can be left as Alias.config
	Quality Config File - Filename of the file that will contain show names and the quality you want that show to be downloaded in (if different from the default download quality) - Can be left as Quality.config
	
	Seasons to Ignore - Show Name (as seen on disk) and season number that you want to ignore (Season numbers below the number specified number will also be ignored, For Example "Show Name=3" will ignore seasons 1,2 and 3)
	Download Quality - The defualt download quality for all shows (except those defined in Quality.config), used if you want some shows in a HD and all others in another SD (or vice-versa)
	
	Replace Characters - Check this if you have SABnzbd replacing characters (otherwise leave unchecked if SABnzbd is set to remove illegal characters from NZB names)
	Download PROPERs - Check if you want PROPERs to be downloaded, this will replace episodes already downloaded (only if it hasn't already downloaded  the PROPER)
	Verbose Logging - Enable additional logging for troubleshooting issues, should be disabled unless required for troubleshooting
	Delete Logs - Delete old log files after X days, set to zero to keep log files until manually deleted

	Make changes as required to RSS.config, Alias.config and Quality.config, format for the config files is shown below (See second tab of SABSyncGUI.exe)
	RSS.config:
	Name|URL
	NZBMatrix-Xvid|http://rss.nzbmatrix.com/rss.php?subcat=6&english=1 			- Name can be anything you want to call it, URL is the URL to the RSS feed containing content you want SABSync to look at
	
	Alias.config:
	Show Name in Feed|Show Name on TheTVDB.com & On Disk (Cleaner looking names, more like Newzbin)
	The Office|The Office (US)					- If the show name in the RSS feed is: "The Office", it should be found as "The Office (US)" on TheTVDb.com and on disk
	CSI|CSI: Crime Scene Investigation			- If the show name in the RSS feed is: "CSI" it should be found as "CSI: Crime Scene Investigation" on TheTVDB.com and on disk
	
	Quality.config
	Show Name|Wanted Quality (xvid or 720p)
	30 Rock|xvid 								- 30 Rock is wanted as a XviD only
	CSI: Crime Scene Investigation|720p			- CSI: Crime Scene Investigation is wanted in 720p only
	
3) Manually run SABSync to ensure everything is running as expected (check log files if required)
4) To automatically have SABSync check for new episodes you will need to setup a Windows Scheduled Task (Time between runs should be at least 15 minutes) (Use SABSyncHide.exe in the Scheduled Task to launch SABSync hidden)
	See the following link for instructions:
	http://www.randomtree.org/eric/techblog/archives/2004/09/the_windows_task_scheduler_is_not_a_secondclass_citizen.html

5) Sit back and enjoy automatically downloading of new or missing episodes as they flow through the RSS feed(s)
I will be including the above (or similar) in the next release.

Also on Pastebin: http://pastebin.com/CnjMC29X
EDIT: I may also be able to set something up in SABSyncGUI.exe that can be clicked and a Scheduled Task created, I'll check it out when I have some time.

-Markus

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 23rd, 2010, 3:44 am
by G3f
Looks good, exactly what it needs. The one thing that is slightly ambiguous is:

NZB Directory - .nzb Backup Folder from SABnzbd Folder Settings

It should be the Watched folder rather than Backup?

I think in terms of use cases, there are going to be a few, and your right I think a lot of people will just use it to keep an entire shows drive up to date. But there are others, such as if you just want to just get the first season of a show to try it out. Or only want a couple of seasons of a certain show because the rest were arse (Season 2, 3 & 4 of Bablyon 5?). I know the functions are there to do this, it's just a little fiddly to set up. (i.e manually excluding shows and seasons).

I guess in an ideal world you could have both. A switch to either include all shows in a folder or watch only certain shows in it. It's really just about making it easier to manage.

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 23rd, 2010, 4:44 am
by johncaruso
Markus,

Running via a scheduled task is throwing an InvalidOperationException due to a Console.ReadKey() at the end of your Main() method in Program.cs of SABSync.exe.  I see in source control this is commented out, but I verified with reflector that it's in SABSync.exe.

Also, you might want to wrap your entire Main block in a try-catch and log any exceptions, or else users get a windows crash dialog asking to report the problem to Microsoft when an exception is thrown during execution of a scheduled task.

Great program btw.  I'd been using MyTvNZB w/TvNZB.com and since TvNZB is down I stumbled onto your program.  Trying out your program with NZBMatrix and its working well so far except for this.

John

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 23rd, 2010, 9:46 am
by markus101
NZB Directory - .nzb Backup Folder from SABnzbd Folder Settings
I think the watched folder should be interpreted as the folder SABnzbd watches for new NZB files and then imports them, even SABnzbd calls it the backup folder.

The problem with picking and choosing which folders to watch is that it would also be manual, instead of exclusions you would have to pick inclusions, I could be wrong, but most people will likely only have a subset of shows to exclude and want to include many more, making the current way faster (albeit a bit of work to setup the exclusions).
Running via a scheduled task is throwing an InvalidOperationException due to a Console.ReadKey() at the end of your Main() method in Program.cs of SABSync.exe.  I see in source control this is commented out, but I verified with reflector that it's in SABSync.exe.

Also, you might want to wrap your entire Main block in a try-catch and log any exceptions, or else users get a windows crash dialog asking to report the problem to Microsoft when an exception is thrown during execution of a scheduled task.
I saw this late last night, I'll try to get a new version out today, with an improved GUI for config (schtasks to setup the Scheduled Task), though I am having issues with Windows 7 and running the scheduled task automatically (yet it works on my Home Server).

Try/Catch would be good, I know a lot of it is already wrapped for this, but testing since I was checking some output I put in the Console.ReadKey() line, I need to be more careful when I updates. Also I haven't updated the SVN in a bit, but it would also be in the Experimental Branch, Which I should be switching back to the Trunk.

-Markus

Re: [WINDOWS] SABSync - TV Show Syncing

Posted: April 23rd, 2010, 12:18 pm
by johncaruso
I saw this late last night, I'll try to get a new version out today, with an improved GUI for config (schtasks to setup the Scheduled Task), though I am having issues with Windows 7 and running the scheduled task automatically (yet it works on my Home Server).

Try/Catch would be good, I know a lot of it is already wrapped for this, but testing since I was checking some output I put in the Console.ReadKey() line, I need to be more careful when I updates. Also I haven't updated the SVN in a bit, but it would also be in the Experimental Branch, Which I should be switching back to the Trunk.
Great.  Hey, if you're interested in some development help I'd be interested in contributing/assisting.  I've been writing software for over 20 yrs now and have about 8 yrs in C#, ASP.NET and related technologies.  If you're interested, send me an email.