Posts Tagged python

Sickbeard with Integrated Torrent Client

Note: Since this post was written, TvTumbler was born. Going forward, all new development will be in TvTumbler.


Sickbeard Integrated Torrent ClientI’ve included a torrent client in my torrent-friendly fork of Sickbeard. The UI is a little limited at the moment, but it’s been wiping the floor with both Transmission and uTorrent here for the last few days in terms of download speed, so I think it’s ready to be set loose on the world.

To enable it, you’ll first need to install libtorrent rasterbar (version 0.16 or later), and its python bindings.

If you do not have an already-running copy of this fork, just follow the general installation instructions.

Otherwise:

For debian derivatives: (i.e. Ubuntu, mint, etc)
sudo apt-get install python-libtorrent

That could hardly be much simpler now could it?

For OSX:
You’ll need to do a little compiling I’m afraid.

This post includes all the required details.

For Windows: (yes, for once I haven’t forgotten about you!)
Go here, and download the .msi which matches your version of python (probably either py27 or py26).
Pick a recent version – the older ones won’t work with magnet links.

Another OS:?
If your OS doesn’t come with a packaged version of libtorrent rasterbar and its python bindings (and note that most will!), then you’ll probably need to build from source.
svn co https://libtorrent.svn.sourceforge.net/svnroot/libtorrent/trunk/ lt/
cd lt/
./autotool.sh
./configure --enable-python-binding
make
sudo make install
sudo ldconfig

Once you have installed the above, restart Sickbeard, go to Config -> Search Settings -> Torrent Method, and change it to “Integrated”.

Any OS-specific tweaks you wish to share? Please note them in the comments.

Notes:

  • Is libtorrent installed? What version do I have?
    python -c "import libtorrent as lt; print lt.version" will tell you very quickly. You should get a response like 0.16.9.0 – if you get an error, or a version less than 0.16, this is likely to be your issue.
  • All my torrents are stuck at “downloading_metadata”: for dht to work (and hence for metadata to be available), the torrent client needs at least one valid peer to exchange data with, but if all your downloads are trackerless magnets, it won’t have one. Try adding a torrent manually (using either a magnet link with trackers, or a link to a .torrent file). You can delete the added torrent as soon as metadata begins to download. [Note: This issue should be resolved with recent releases]
  • Having other Issues? Check out this post (and read through the comments) to see if someone else has addressed it.
  • Still having Issues? Check out the github issue tracker. Please search the existing issues before creating a new one, and include a debug log in any new issues! (you can censor it beforehand if you feel the need)
  • It looks like ubuntu 12.04 installs libtorrent 0.15.x by default, which is a little too outdated for use here. So, if you are a 12.04 user, you’ll either need to build from source, or find a ppa with a more recent version (please post any suggestions in the comments). Thanks go to Chris for pointing this out.Update (with thanks to Dennis): This repo appears to have all the needed packages.

, , ,

50 Comments

Building Libtorrent-rasterbar on OSX

Compiling Rasterbar Libtorrent on OSX 10.7 or 10.8 (tested on both 10.7.5 and 10.8.4), without brew and all the crap it brings with it.

First, you’ll need to install XCode, and command-line tools.
Then, you’ll need to download and build boost:

http://www.boost.org/users/download/

Click on ‘Download’, and download the latest .tar.gz. In my case this was boost_1_53_0.tar.gz

tar -zxvf boost_*.tar.gz
cd boost_*
./bootstrap.sh
./b2
sudo ./b2 install

This all ran cleanly in my case, but googling would seem to imply that it often gives errors.
Next, download the libtorrent source:

http://code.google.com/p/libtorrent/downloads/list

And again, download the latest .tar.gz. In my case this was libtorrent-rasterbar-0.16.9.tar.gz

tar -zxvf libtorrent-rasterbar-0.16.9.tar.gz
cd libtorrent-rasterbar-0.16.9
./configure --enable-python-binding
make
sudo make install

That should be it, but in my case for some reason the python bindings were put into /usr/local/lib/python2.6/site-packages/ (where the correct site-packages is in fact /Library/Python/2.6/site-packages). I’m not really sure why this happened, but it’s easy enough to fix. Continuing from where we were above:
cd bindings/python
sudo python setup.py install

And it gets the correct directory this time around.

Update (Sept 2, 2013): Tested with libtorrent 0.16.11 and boost 1.54 on Max OSX 10.9. Works as described above. Boost gives lots of deprecation warnings, but it runs without issue.

,

4 Comments

Sickbeard Manual RSS/Custom Torrent Providers

Note: Since this post was written, TvTumbler was born. Going forward, all new development will be in TvTumbler.


Custom RSS Torrent feedI’ve added experimental support for Custom RSS torrent feeds into my sickbeard fork.

The whole thing should be self-explanatory I think. Currently I use the following feeds myself:

  • TPB – TvTeam: http://rss.thepiratebay.sx/user/7e434ea6455f089db7f0291b3bd1d4db
  • TPB – VTV: http://rss.thepiratebay.sx/user/e395935fa39597e3997b916a295f23e4
  • TPB – ettv: http://rss.thepiratebay.sx/user/0e3b2f46e5892dc5b2aac6dbe548bc27

These are links to the rss feeds for specific users on thepiratebay.se.
Obviously any rss feed that includes links to download torrent files (or public magnet links) will work also.

Other feeds that have been recommended to me (but I don’t use myself) include:

  • BT-chat: http://rss.bt-chat.com/?cat=9
  • monova.org: http://www.monova.org/rss.php?type=catname&id=8

(Please feel free to recommend others in the comments)

Consider this experimental for now. It works for me, but I can’t guarantee that it will work for anyone else.

Check out this post for more details about this fork.

,

33 Comments

Sickbeard Fork: Feature Summary

Note: Since this post was written, TvTumbler was born. Going forward, all new development will be in TvTumbler.


Well I’ve been working on and off on Sickbeard for the last few weeks, and the list of additions is starting to grow. So it’s probably time for a summary of the main additions.

Sickbeard Integrated Torrent ClientIntegrated Torrent Client

Uses libtorrent-rasterbar to provide a very simple (but very fast!) integrated torrent client. Manages queueing, priority, seeding, and deleting of torrent automatically. No need to use blackhole or watch dirs (but of course you can use those if you wish). If libtorrent rasterbar is not available on your system, this feature simply won’t show. You can continue to use your existing torrent client without issue.

Custom RSS Torrent feedCustom Torrent RSS Providers

Add one or more custom torrent providers. Any torrent source with an RSS feed should work for this.
See this post for more info (including some recommended feeds).

 

New Torrent Search Providers

I’ve added all the useful/reliable torrent providers I know as search options (at least the ones that you don’t need invites/accounts for). These are:

  • ShowRSS: This appears to be very reliable, but their show naming is not always smart, and their backlog can be limited.
  • Kickass Torrents: Includes solid backlog support.
  • DailyTvTorrents: Again, appears reliable, and includes solid backlog support (thanks to lylej for the heads-up on this one).(sadly, this is now gone)
  • BBC iPlayer support (via the perl get_iplayer script): See here for instructions on how to set this up.
  • Support for magnet links.
  • PublicHD support: No backlog yet, their RSS is *extremely* limited.
  • And additionally, EZRSS has been “fixed” so that it will continue to work (by using the twitter feed, tpb feed, and a feedburner feed as backups) even when the site goes down (which happens a lot!)

 

Custom Scene Names

The edit show page now includes a box into which you can type ‘custom’ show names (or ‘Scene Names’). These will be searched for in addition to the tvdb show name. This is incredibly useful for picking up on minor variations in show names.

 

Custom Scene Numbering

Anyone who has used sickbeard for any length will know how annoying this is: The scene decides that the first episode was a double, but tvdb (from which sickbeard gets its numbering) thinks otherwise. Or they include a special in the numbering. Or they disagree on season numbers. Or they call the “special” episode “SxE00″, where tvdb calls it “S00E56″.

Well this gives you the facility to work around this problem, without having to manually “fix” everything sickbeard downloads (or tolerate the duplicates it creates). You can now manually enter a season/episode number for each episode, and this is what sickbeard will search for when trawling the internet. And it will renumber it correctly once it’s downloaded to your PVR.

The code will also regularly check thexem.de for the known variations between scene and tvdb numbering – so in most cases you probably won’t even need to correct the episode numbers, sickbeard will do so itself (but of course it will respect your numbering if you have specified it manually).

 


Installation Instructions

These now have a wiki page of their own. See How to Install Sickbeard for Torrents on github.


And I do believe that this time, I’m really finished. These are the main things that have annoyed me about sickbeard since I’ve started using it, and it took far more work than it should have to actually fix them (all-in, I’ve probably spent a full day on this). If I feel tempted to add features to this in the future, I think I’ll start by doing a re-write: it will save time in the long run (and imo sickbeard is badly in need of a rewrite).

As always, the full source is available from https://github.com/bricky/Sick-Beard.

 


Update/Please Note: I don’t intend to add any more features to this – so please stop asking for them! Sickbeard is, as far as I’m concerned, broken – and I don’t have the time to fix it, or write a replacement.
I will generally keep this up to date however, until I find a better system (or actually do the rewrite).

(if someone else wishes to start a rewrite however, please let me know – I may be able to contribute)


Update (Sept 2013): I’m doing the rewrite: TvTumbler, an addon for XBMC with the same basic functionality. I’d encourage any new users (who also use XMBC) to try TvTumbler instead.


Having Issues?: Please use the github issue tracker (and include a debug log, or your issue will likely be ignored)

, , , , , , ,

147 Comments

Sickbeard support for ShowRSS & Kickass Torrents


This fork has moved on a bit since this was posted. See here for details.

Sickbeard is a simply wonderful piece of software, but its only real torrent support is for ezrss, which is often (and currently) broken. There’s no real technical reason to restrict it to just this feed (at least none that I could see), so I’ve forked it and added support for another feed called showRSS.

https://github.com/bricky/Sick-Beard

That is all.

Update: Now also includes the ability to add your own scene exceptions through the web UI, and uses twitter rss as a backup for ezrss when it fails.

Update 2: Now also includes support for kat.ph (aka Kickass Torrents), which provides a much wider range of shows (and also, apparently, backlog support).

, , ,

12 Comments

getmail FutureWarning with python2.3

Some python (I assume) update on an old Centos box made getmail bork:

/usr/lib/python2.3/optparse.py:668: FutureWarning: %u/%o/%x/%X of negative int will
return a signed string in Python 2.4 and up
return ("<%s at 0x%x: %r>"

It gets more than a little annoying when you get emailed those few lines several hundred times per day. However, according to the getmail FAQ, it’s not their fault – it’s the nasty evil lazy python developers’ fault.

Changing the top of the /usr/bin/getmail file to ignore the warning made it go away:

#!/usr/bin/python -Wignore::FutureWarning

,

No Comments

css.php