Autodownload script
Posted: November 3rd, 2008, 11:13 am
I recently re-worked my automatic download system, writing it all in python this time. I don't like to use the default sabnzbd rss feeds, since it can't tell what I already have, so I worked up one that would only fill in episodes/movies that I'm missing. There are two ways of doing this:
Database
I don't like this, since it requires a full database of all your stuff, which is sometimes a bitch to populate, and it also requires that you add the database stuff into your post-processing script. This is why I went the route of:
Filesystem
I have all of my TV and Movies pretty well organized, so it's pretty easy to read straight from the file system. My TV is in the format
"BASE_DIRECTORY/SHOW_NAME/Season SEASON_NUMBER/SHOW_NAME - SEASON_NUMBERxEPSIODE_NUMBER - EPISODE_TITLE"
I imagine that a lot of you have your TV in the same format, so this script should be easily portable.
I'm uploading two scripts, here's a rundown on their functionality:
rss_tv.py:
http://pastebin.com/m7d0d3793
You'll need to update the script with some of your own information, namely:
-Your SABnzbd host:port info
-A newzbin RSS URL that will include all the TV you want (I just ran a search for shows in English, less than 450 MB, in divx or xvid.
-The path to your TV directory
With the correct information added, it will run through the feed, checking if you want any of the shows. This is decided based on wether you have a folder for that show, such as "BASE_TV_DIRECTORY/House". If the show is wanted, the script checks to see if you have that specific episode yet. If you don't, and the episode is not currently in the SABnzbd queue, it is added.
rss_movies:
http://pastebin.com/m24f8f3ab
You'll need to update the script with some of your own information, namely:
-Your SABnzbd host:port info
-A newzbin RSS URL that will include all the Movies you want (I just ran a search for movies in English, from 650-1600 MB, in divx or xvid.
-The path to your Movies directory
This script will run through the RSS feed and decide if the movie is "good". The logic I use is if the movie is over 8.0 on IMDB with over 1,000 votes, I won't mind downloading it. Of course, the script also checks to see if you have that movie yet, or if it's in the queue.
I set these to run on a schedule. The TV script runs every 10 minutes, while the movie script runs every few hours.
If anyone uses this, please let me know how it works for you, and if you have any recommendations. I just did this yesterday, so it's very much a work in progress, but it's worked great so far.
Database
I don't like this, since it requires a full database of all your stuff, which is sometimes a bitch to populate, and it also requires that you add the database stuff into your post-processing script. This is why I went the route of:
Filesystem
I have all of my TV and Movies pretty well organized, so it's pretty easy to read straight from the file system. My TV is in the format
"BASE_DIRECTORY/SHOW_NAME/Season SEASON_NUMBER/SHOW_NAME - SEASON_NUMBERxEPSIODE_NUMBER - EPISODE_TITLE"
I imagine that a lot of you have your TV in the same format, so this script should be easily portable.
I'm uploading two scripts, here's a rundown on their functionality:
rss_tv.py:
http://pastebin.com/m7d0d3793
You'll need to update the script with some of your own information, namely:
-Your SABnzbd host:port info
-A newzbin RSS URL that will include all the TV you want (I just ran a search for shows in English, less than 450 MB, in divx or xvid.
-The path to your TV directory
With the correct information added, it will run through the feed, checking if you want any of the shows. This is decided based on wether you have a folder for that show, such as "BASE_TV_DIRECTORY/House". If the show is wanted, the script checks to see if you have that specific episode yet. If you don't, and the episode is not currently in the SABnzbd queue, it is added.
rss_movies:
http://pastebin.com/m24f8f3ab
You'll need to update the script with some of your own information, namely:
-Your SABnzbd host:port info
-A newzbin RSS URL that will include all the Movies you want (I just ran a search for movies in English, from 650-1600 MB, in divx or xvid.
-The path to your Movies directory
This script will run through the RSS feed and decide if the movie is "good". The logic I use is if the movie is over 8.0 on IMDB with over 1,000 votes, I won't mind downloading it. Of course, the script also checks to see if you have that movie yet, or if it's in the queue.
I set these to run on a schedule. The TV script runs every 10 minutes, while the movie script runs every few hours.
If anyone uses this, please let me know how it works for you, and if you have any recommendations. I just did this yesterday, so it's very much a work in progress, but it's worked great so far.