In my first post I cited how to set up an automated TV Schedule download system that was completely hands off once you set it up. Unfortunately it only worked for Windows systems, so in the past couple days I took the time and figured out the most convenient setup for Mac users.
Disclaimer:
You will need to be somewhat knowledgeable in the realm of computers and the point of this is to have a media unit (such as a Boxee Box) to stream these files. This simply automates that process for you.
So how does it all work?
TV Shows 2 monitors your RSS feeds for shows, when a new show gets posted it snags the torrent and put it in one folder. For this whole set up I use only three folders. A TV Show Torrents folder, Rename TV Shows folder, and TV Shows folder. TV Shows 2 downloads the torrent into the TV Show Torrents folder, Transmission monitors the folder and starts the torrent. Once the torrent finishes, Hazel kicks off and uses UnRarX to unpack scene releases and tags the file with a green color label. Then Hazel executes rules to move AVI, MKV, or MPG files only larger than 100 MB into a Rename TV Shows folder, this stops it from moving garbage files. If a file reaches 4 hours of age (garbage files), one last rule executes to delete the files permanently. Once in the Rename TV Shows folder, a rule monitors files that are tagged green, and runs TVNamer to rename the file to Show Name.SXXEXX.Episode Name.ext TVNamer also kicks off and moves it to it’s final destination. Boxee scans the folder and pulls in the new shows so they can be watched.
Let’s Get Started!
First there will be a few programs, scripts, and configuration files you will need which I will provide here. You will need to make changes in some of these programs in order for them to work on your own setup, but I will detail that in the article.
Programs Required:
TVNamer (You don’t have to download this, we can install it from Terminal.)
Hazel ($21.95)
Files Required:
I’m going to go through each program individually and detail how they should be set up.
First thing you should do is create yourself the following folders:
A folder named “TV Show Torrents”, you’ll use this folder for TV Shows 2 to download the .torrent files, and where Transmission will download the shows.
A folder named “Rename TV Shows”, this is where Hazel will move files to be renamed before moving them to their final destination.
OPTIONAL: A folder named “TV Shows” this will be the final resting place of your shows, if you already have such a folder or wish to use another folder by all means use them.
Finally, in your Documents folder create one more called “Scripts”. This is where we’ll place the Hazel Rules and TVNamer Configuration files you should have downloaded.
UnRarX
There’s no need to detail UnRarX as it simply needs to be installed, as long as you’ve done that much everything will work just fine.
Transmission
You can use uTorrent if you wish but I choose to use both applications for different purposes. Once installed and in Transmission open up the Preference Pane and click on Transfers and make sure you’re on the “Adding” tab. Make your settings match below:
Once you have your preferences set up in the “Adding” tab, switch to the “Management” tab and make your settings match below. If you wish you can play with the “Queues” area but I left everything unchecked.
That’s it for setting up Transmission, next you’ll be moving on to TV Shows 2.
TV Shows 2
Install TV Shows 2, it’s not a standalone program (yet, version 3 will be with the ability to extract scene releases built in) it’s actually a Preference Pane in System Preferences. Once open you’ll see the screen below:
Switch over to the “Preferences” tab and make your settings match below. You can choose to download HD versions by default but sadly a lot of shows these days are not available in HD, it will wait out a certain amount of hours before it snags an SD version for you. You can change the default value of how many hours it waits with a Terminal command. If you wish to change it, open up Terminal and use the following command change the value of X for the number of hours you wish to wait:
defaults write com.victorpimentel.TVShows2 AnyVersionInterval -float XPlease note though a value of less than 3 hours will do nothing, the lowest interval it can wait is 3 hours before searching for SD. If you wanted, you could use a very large value such as 100,000 to stop it from downloading any file other than HD so you could manually download it yourself.
As you can see “Use additional sources for HD is checked (may contain rars)”, a Hazel rule will execute and extract those for us without a problem. You can choose your “Growl Settings” as you wish.
Next you can go back to “Subscriptions” and click “Add Show”. You’ll be presented with the screen below (if you can’t tell I like The Big Bang Theory). Just like TED you can choose “Next Aired Episode” or “This Episode”, based on sources it will present all the available torrents it can find for the show you’ve chosen if you choose “This Episode”. It will also download from the episode you choose to the most recent episode available if you go this route. Once again, I suggest using other sources if you’re more than one episode behind. Also, you will see “Download in HD” if you know a show is constantly available in HD, you can choose this or if you have your own RSS feed you’d like to add in once you choose the show it’s probably a safe bet. It’s much more reliable then TED for this. Once you’ve made these choices, go ahead and hit “Subscribe”.
Once you’ve added the show, you’ll something like the image below.
If you click on the show, you’ll be presented with the following screen.
Here you can enable HD downloading, unsubscribe or click “Edit”. If you click “Edit” you’ll get the following screen, where you can add criteria for the show to follow for downloading. This is where I found the one short fall of TV Shows 2, and that’s it only provides you with one feed initially for a show. (Unless you have use additional sources checked, at which point it’ll fall on those sources if it needs to, they’re just not listed) I suggest adding in a few others just in case. You can do that by clicking the “+” sign below Feed URLs and getting the RSS feed of the show from other sites.
You can now exit out of the pane for TV Shows 2, as it will be running in your status bar.
TVNamer
Installing TVNamer is quite easy, under Utilities open up Terminal. You’re going to type the following command:
sudo easy_install tvnamerIt will then prompt you for your password, type it and press return. It will go out to GitHub and grab the source code for you and install it. Once it finishes installing, you can exit out of Terminal.
The next thing you will need to do is open up the “mytvnamerconfig.json” file you should have downloaded and placed in your Scripts folder in TextEdit or the code editor of your choice.
Look for the following line near the bottom of the file:
"move_files_destination": "/Volumes/TV Shows/%(seriesname)s/Season%(seasonnumber)d",Change this to the final destination of your TV Shows folder, the code is set to make TV Show folders and Season folders for you if they do not exist. The naming convention for a Season folder is “Season1″ I choose this because if anyone is coming from Windows and using theRenamer, their folders will look like this.
NOTE: If you’re using a NAS, open up the mounted drive, navigate to the folder, right-click and get the /Volumes for your NAS, the afp: will not work.
And believe it or not, that’s all it takes to set up TVNamer, Hazel will be referencing that configuration file for us so we don’t have to worry about it.
Hazel
Finally, you’ll need to get and install Hazel which runs as a Preference Pane of System Preference, so it’s constantly running. Hazel is probably going to take the longest to set up, but should go fast if you use the rules I predefined for you. First thing you’re going to want to do is add your three folders to the folder sidebar like the image below, “TV Shows” is optional only if you’d like to add the rules to delete files that reach an age of 2 weeks old. If you don’t wish to have those rules, you don’t have to add that folder.
Next, you have two ways to add the rules. You can click on the folder in the the Folder Pane, and then click the cog, and hit Import Rules, and select the Hazel Rules that are named for each folder. They’re going to drop in as unchecked and inactive. The other way is in your Scripts folder, you can double click the rule, it’ll open up in Hazel and allow you to choose the folder you want to apply them to. You’re going to have to relink some of the folders in your rules as they may be different then the ones that the rules have predefined, but before you activate anything that has the ability to delete files, make sure that’s what you want because once you check it, there’s no going back. The shell script that is used is “-frm “$1″ f stands for forced, r is for recursive and m is for medium (7-pass), the $1 references the file in question. So if there’s TV Shows you have not watched or want to keep, I suggest moving them to a safe place until they’re watched if you choose to activate the Delete Old Shows rule.
The rules under “TV Shows” for deleting shows that are were not created within the last 2 weeks, is completely optional. It’s just if you are limited on space or don’t wish to keep the files for a period longer than that time.
So to get started, let’s jump into the “TV Show Torrents” folder rules. The first rule, “Empty Old Files” is to trash all the extra garbage that comes with TV Shows, .nfo, .txt, sample files, folders etc. If you right-click the rule and hit edit, you’ll see the image below. You can change the amount of time if you want, but I did 4 hours just in case for whatever reason a torrent took a long time to download. I also left it at the top of hierarchy because if it’s below the “Subfolders” the shell bin script for deleting files is set to be recursive, and the Subfolders rule will make it apply to folders, not allowing you to delete the highest folder if it was something like a Scene Release.
The next rule for Subfolders can be left alone, it’s just saying if there’s a subfolder in TV Show Torrents, apply all the following rules to those subfolders.
Next is the UnRar files, which can also be left alone it’s just telling Hazel to look for the rar extension and unarchive the file..
The following three rules for Move MKV, MP4, and AVI will have to be slightly changed. The rule looks for the file extension, and if the file is over 100 MB’s move it to Rename TV Shows, once it’s in that folder change the color label to green. I choose 100mb, because this stops Hazel from grabbing possibly sample files or other garbage files you don’t need. For each rule, right-click go to Edit, and just make sure the folder is linked up with your Rename TV Shows folder. If it can’t find the directory it’s supposed to move to, there will be a little yellow exclamation point in between the checkbox and file rule telling you there’s an issue that must be addressed.
In the folder pane, click on the “Rename TV Shows” folder, we only have one rule here to edit. Right-click on “Rename w/TVnamer & Move”, and click edit. Under “Do the following” click the down arrow next to “Edit Script” and make sure you change over “YOURUSERNAME” to what your username is on the computer like below:
/usr/local/bin/tvnamer --config=/Users/YOURUSERNAME/Documents/Scripts/mytvnamerconfig.json "$1"As for the folder “TV Shows”, you don’t have to edit any of the rules here, plus they are completely optional. Like I said if you don’t wish to have them clear out files once they reach 2 weeks of age, just don’t even add these in.
Finally, and this is optional but at the top click on the “Trash” tab if you wish you can change your settings to what the image below shows. It’s set to delete files in the trash that reach an age of 1 hour, it keeps the Trash Size under 1GB and the oversized files are deleted immediately. Lastly I have it “securely (shred)” the files, which is the same as doing a “Secure Empty Trash.” App sweep is nifty but I don’t use it, it’s to remove support files and completely gets rid of an app for you.
Once you’re officially set up and ready to go, you can activate the rules in Hazel. Once you’ve done that you can now exit out of the Hazel Preference Pane.
You’re All Finished!
Your automated TV Show Schedule system for Mac OS X should now be fully ready to go. If you have any questions, comments, concerns, feel free to leave them in the comment section below. If you need in-depth help don’t be afraid to contact me on Skype. My Skype name is JacobRyan. Thanks for reading and I hope you enjoyed!
You can leave a response, or trackback from your own site.















No Responses to this article