Downloaded from: justpaste.it/1mx Automatic newsgroup TV show downloading By RootyB I'm doing this in between my actual responsibilities, so it's going to be fairly quick and dirty. It should address just about everything you need to know to get started, though. It's very rough, mostly un-edited, and is VERY version 0.1. Let me know if I'm missing anything glaring, or something doesn't make sense. Also, this tutorial is going to focus on the use of Newzbin, as it's probably the only reason many people can wade through the garbage posted on Newsgroups. I'm aware that you can use newsgroups without Newzbin. It just sucks to do so. Since there are already tons of tutorials on XBMC, I'm going to focus on the automatic downloading of new episodes of TV shows, since that, in my opinion, is where newsgroups really outshine bittorrent. In doing so, I'm going to skip a lot of settings and options that have nothing to do with downloading TV shows. Just FYI. What you need: - Newsgroup access (http://astraweb.com or http://giganews.com) - A Newzbin account (http://newzbin.com) - SABnzbd (http://sabnzbd.org) (I'd stick to 0.4.12 for now. 0.5 nearing the end of beta, but still has some issues to work out) Cross-platform (python) - Episode Butler (http://members.home.nl/janoz/episodebutler/) Cross-platform (You'll need JRE 1.5 at least) - Python 2.6 (if you want to run the script I'm going to give you that will force XBMC to update its library when new episodes are downloaded. If not, it's not required for this tutorial)
I've found that the easiest way for bittorrent users to understand newsgroup downloading is an analogy. To that end, I present you with a somewhat shoehorned (but mostly accurate, and entirely useful) description of using newsgroups for bittorrent users: Newzbin is like a bittorrent tracker/index site. You go there, search for what you want, and download the results as a.nzb (instead of.torrent) file that tells your client where all the parts of the requested file are located. Once you get a.nzb file, you pass it along to SABnzbd. SABnzbd is roughly the equivalent of your bittorrent client. Once you give it that file, it connects to your news host (Astraweb or Giganews, really), which then act like torrent seeders and send you the various pieces of your file as fast as your little cable modem can carry them (and yes, it's going to be as fast as YOUR connection can carry them. It's very rare to download something from a good news server at anything less than the max speed of your connection). One piece I didn't go into just now was Episode Butler. Episode Butler is analogous to T.E.D. (Torrent Episode Downloader). You tell it what shows you like, and what format you want them in. It checks Newzbin for new episodes and automatically tells SABnzbd to download them for you. So, to recap: News host = seeders Newzbin = ThePirateBay SABnzbd = utorrent Episode Butler = T.E.D.
A couple notes: Newsgroup access: Some ISPs offer newsgroup access to their customers. Most don't, or if they do, their retention and connection speeds are terrible. FYI: "retention" is how long files stay on the server. 300-400+ days is good. Most ISP news servers have 15-30 day retention, at most, which is fine for downloading your TV shows every week, but they also usually cap bandwidth to something pathetic like 20-30KB/s. In other words, you're going to have to pay a third-party. This is the part that scares off most bittorrent users, but in my opinion, the convenience, security, and speed all make it worth it. There are lots of newsgroup servers out there. The two big names, however, are Astraweb (http://astraweb.com) and Giganews (http://giganews.com) I've used each of these for a couple of months, and I'd put these two at about the same level, but for different reasons. Astraweb is cheaper. Giganews provides better service. Now, let me quantify that. Right now, Astraweb's "Unlimited DSL" plan (no download limit, no speed cap) is $15/mo. Their retention is 552 days (I think it goes up every day. As in, they still have files from August 16th, 2008). Giganews' comparable plan is $24.99 (though, they usually have a half-off deal for the first month on their $29.99 plan, which includes SSL encryption). When I first started experimenting with newsgroups, I went with Astraweb for the price. The reason I finally switched to Giganews was that I was getting a lot of failed downloads on
(somewhat older) files that should have been well within the retention period with Astraweb. Since switching to Giganews, I don't have this problem anymore. Long story short: If you're just using it for TV, there's no reason not to go with Astraweb. If you want to download other things, and don't mind paying more, I'd go with Giganews. Also, Giganews has a free two-week/10gb trial that's definitely worth a try if you're on the fence about newsgroups. Newzbin: Here's the other piece that's going to cost you a little cash. Now, when I say "a little", I actually mean it. They're entirely pay-as-you-go, and cost about $0.47/week (their prices are in GBP, so it depends on the exchange rate on any given day). During the holidays, they usually do a half off sale, so that's the time to stock up and prepay for the year. One more caveat: Newzbin premium accounts are invite-only. Chances are, though, you know someone that has a Newzbin account, and just about everyone with a Newzbin account should have a couple of invites available. (note: You can use newsgroups without Newzbin; it just sucks. You also can't use Episode Butler without a premium Newzbin account.) Newzbin is a user-maintained index of files that are floating around on news servers. What this means is that every file listed in Newzbin's search engine was put there by a person. This is good for quality (some chaff still gets through, but not much), but it also means you're not seeing
EVERYTHING newsgroups have to offer. For the sake of this tutorial, though, that doesn't matter. Okay, let's get started with the, you know, tutorial. First, let's install SABnzbd. You can leave the default install locations alone if you'd like; it doesn't really matter. At the end of the installation, leave the "Start SABnzbd (hidden) box checked, and hit Finish. You'll notice that your default web browser was launched, with an address of "http://localhost:8080/sabnzbd". This is because the GUI for SABnzbd is accessed entirely via web browser. Now, you need to give SABnzbd your news host information. To do so, click on "Config" at the top, then "Servers". Go ahead and fill in your server/login information here.
Host: either "news.astraweb.com" or "news.giganews.com", depending on who you signed up with. Port: leave blank Username: enter your news host username Password: enter your news host password Timeout: leave at 120 Connections: this depends on your news host, but I believe that both Astraweb and Giganews allow up to 20 simultaneous connections, so enter "20" SSL: only check this if you signed up for an account that supports SSL. Backup Server: leave unchecked When you're done, it should look something like this: Click "Save Changes" at the bottom. Next, let's give SABnzbd a default location to put the files we tell it to download. Without leaving "Config", click on "Folders". All of these are fairly well-labeled, and not relevant to the automated TV downloading we're setting up, so I'll touch on them only briefly. If you just want to specify a sub-folder of your user folder (shown at the top of the "User Folders" section), you can do so by just giving folder names, such as "downloads/incomplete". If, on the other hand, you want your folders somewhere else entirely, you'll need to specify entirely folder paths (at least on windows. I haven't used SABnzbd on any other platform), such as "C:\Media\Incomplete", etc.
The "Completed Download Folder" is where SABnzbd will put files that either don't have a category set, or whose category doesn't have a specific download location set. "Watched Folder" is a folder that you can save.nzb files to (from Newzbin or any other nzb index site), and SABnzbd will automatically load them and start downloading the specified files. ------If you want XBMC to automatically update its library when a file finishes downloading------- 1) Enter a path in the "Folder containing user scripts" field. This will let us put scripts in that folder for processing the files we download. Remember this location. 2) If you're not using a folder that already exists, you'll need to go make this folder. I think this is the only one that SABnzbd doesn't make for you). Note: In 0.4.12, there is a bug that will prevent python scripts from running properly if there are any spaces in this folder name. Mine currently reads "c:\progra~2\sabnzbd\scripts", which just points to "C:\Program Files (x86)\sabnzbd\scripts\". This should be fixed in 0.5 by the time it's released. I'm not sure if it is or not in the latest beta. 3) Download this file to the folder you just created: http://ownedgear.com/shared/xbmcupdate.pys (rename to XBMCUpdate.py) 4) Open that file in any text editor and enter your XBMC web UI IP address and Port at the top: # Set XBMC address XBMC_IP = "" # Set XBMC port XBMC_Port = "" If you use Prowl on your iphone, you can also enter your Prowl API key on the next line to get notifications when downloads complete
# Enter your Prowl API - Leave blank to disable Prowl notifications API = "" --------------------------------------------------------------------------------------------------------------------------------- The most important part of this page, though, is this at the bottom: First, let's check "Enable TV Sorting". Then, depending on your preferred file structure, you can create a naming structure for your episodes in the box at the bottom, or just hit one of the buttons to enter a preset. I personally use the first preset, but XBMC's library scanner should be able to successfully recognize any of the presets. Click "Save Changes" at the bottom. Now, click on "Categories" (still in "Config). You should see a list of categories, modes, folders, etc. Let me take a second to touch on one of the nicer aspects of downloading with Newzbin and SABnzbd. When you download a.nzb from Newzbin, SABnzbd knows what category it belongs in. No regex, no hackery. Just the reading of metadata. This is rather useful for us, as it means that SABnzbd knows when we're downloading TV shows, and what to do with them. If you'd like your TV shows put in a folder outside of the default, feel free to enter that here, in the "Folder/Path" column for category "tv".
------If you want XBMC to automatically update its library when a file finishes downloading------- Use the "Script" drop-down in the TV row, and select XBMCUpdate.py --------------------------------------------------------------------------------------------------------------------------------- Once you do so, hit "Save" in the far right column of the "tv" row. That's just about all the settings we need to change in SABnzbd for downloading TV shows, but there are a few convenience settings we can still change. If you'd like to be able to access SABnzbd from another computer on your network: First (yes, still in "Config"), click on "General". In the "Host" field, enter "0.0.0.0". This tells SABnzbd to listen for WebUI connections on the IP address of the system. Most of the time, this works fine. For whatever reason, though, on some systems, the autodetection fails, and you'll need to manually enter the IP address of your media center. Mine currently says "192.168.1.120", as I was having some problems with 0.0.0.0. As such, I can access my SABnzbd configuration by browsing to http://192.168.1.120:8080 from any computer on my LAN. You might also want to set a username and password, to limit who can access your SABnzbd config, but that's up to you. Also, copy the API Key shown and save it somewhere. You'll need it when we set up Episode Butler. In the "Cleanup List" field, you can enter file extensions that you want SABnzbd to automatically delete when it's done downloading. This is useful because a lot of newsgroup uploaders like to throw.nfo (not the XBMC kind),.sfv, etc files in there that we don't need. Here's my list of filetypes to delete. Feel free to copy/paste it as-is, or modify it to your liking:
---------------------------------------------.nfo,.sfv,.db,.url,.nzb,.par2,.srr --------------------------------------------- Click "Save Changes" at the bottom. Finally, let's click on "Switches" at the top, and find the "Launch Browser on Startup" box and uncheck it. (We're gonna put SABnzbd in our Windows start menu, and we don't want it launching a browser every time windows starts) Click "Save Changes" at the bottom. Now, you can close your browser window. In your start menu, go to the SABnzbd folder, find "SABnzbd", and drag it to your Startup folder. This way, SABnzbd is always running. Unlike a torrent client, though, it doesn't keep "seeding" files you download, so there's never really any reason to close it. (If you do need to exit SABnzbd, though, you can do so by logging into its web interface, clicking on the "Home" tab, and clicking "Shutdown".)
Next, Episode Butler! Episode Butler doesn't come with an installer, so just extract the ZIP file you downloaded, and put the "episodebutler" folder in C:\Program Files\ (or wherever you want it). Then, make a shortcut for episodebutler.exe, and drag it to the Startup folder in your start menu. Next, fire up that shortcut (or episodebutler.exe directly). You'll see that it launches a web browser as well. Just like SABnzbd, Episode Butler's UI is entirely browser-based. This setup should be a lot quicker and simpler than SABnzbd's. First, click "Config" at the top. Click on the "Newzbin" section, enter your Newzbin username and password, and set the "Retention" to, say... 30 (It doesn't matter so much. It's only going to be downloading new episodes for you). If you scroll down to the bottom, you can select languages and default video formats. Episode Butler will download the first instance of an episode it finds that matches any of the checked boxes. I don't have any of these checked right here. You probably won't need to, either. Click "Save" at the bottom. Next, click on "Webserver", and enter a username and password if you'd like to limit access to your Episode Butler interface. You can also change the Episode Butler port number here. Click "Save" at the bottom. Next, click on "Sabnzbd"
Check the box that says "Enabled". Host: Enter the network address for your system. Since you entered 0.0.0.0 or the computer's IP address, SABnzbd is only listening for connections directed to your media center's IP address (not 127.0.0.1 or "localhost") Port: Enter your SABnzbd port (should be 8080 if you didn't change it) RootDir: sabnzbd Username & Password: If you told SABnzbd to use a username and password for the web interface, enter them here. Activeness: Default Category: TV API-Key: Paste the API Key that you copied from the General tab of SABnzbd's config menu. Click "Save" at the bottom. That does it for the general configuration of Episode Butler! Now we just have to tell it what shows we want it to download. To add a show to Episode Butler: Click "Shows" at the top of the page. In the text box at the bottom, type all or part of the name of the show you want to add, and click "Search for show".
You'll be taken to a page listing any matching shows. To add a show, click (conveniently enough) "Add this show", and you'll be taken back to your list of shows. You can pick the video quality for each show individually by using the "Quality" drop-down, but this can be a little vague, so I prefer to do so in the show settings, so leave this set to "Any". To access a show's settings, click the wrench on the right (to delete a show, just hit the red "x"). For most shows, you won't want to change the first few settings. They're usually pretty spot-on. With some shows, though (I think The Daily Show is one), you may need to change the "Episode Format" drop-down to "Daily Date" instead of the default. This just depends on how the show is labeled when it's added to Newzbin. For 99% of shows, though, the default settings are fine. Now, if you want to pick specific video formats for some of your shows (for example, I download 24 in HD, and Big Love for my girlfriend in SD, because she doesn't care about HD), you can scroll down to the "Enable Video Format" box. Check that, then pick the formats you want. Generally speaking, if you want: HD: Check "H.264", "x264", and "720p" SD: Check "DivX" and "XviD" Don't check JUST 1080p. To the best of my knowledge, no shows are broadcast in 1080p yet, so you'll be waiting a long time for the BD-Rips to get uploaded. A hint for nerds like me: Usually, the SD copy of a show is uploaded before the HD copy. Sometimes, I want an SD copy just to watch right away, and an HD copy for my archive. There isn't a clean way to tell Episode Butler to do this, but you can add the same show twice, with different video settings for each. This will ALWAYS download two copies, so it's not ideal, but it'll do in a pinch.
So, that's it! You're good to go with downloading TV shows automatically from newsgroups. The beautiful part of all this is that SABnzbd will put all of your downloaded TV shows into a folder structure that's perfect for XBMC's library scans, then tell XBMC to update its library (if you used my script). Good luck! If you run into any trouble, the SABnzbd forums are pretty great. Just search before asking questions, as always.