bricky/Sick-Beard — pull request #8 by SoulAuctioneer (2013-03-26 10:13:20+00:00)
Title: Additional torrent metafile validation in GenericProvider

Please don't pull this just yet -- I've not tested the refactored TorrentProvider.downloadResult() with magnet URLs yet, as I'm not sure how/where from the provider acquires them -- I'd be grateful if you can let me know how to have SickBeard pull a magnet URL as with KAT it's always a torrent metafile.

I have found that significant minority of torrent metafiles begin with a not-so-magic "d12:_info_length", rather than the expected "d8:announce". While this is not explicit in the spec, it is valid bencode and such files work fine with Transmission, uTorrent and official BitTorrent client.

- Modified torrent metafile validation to allow metafiles starting with "d12:_info_length"
- DRYed out the TorrentProvider class's downloadResult function, which was duplicating code from the parent function, as well as never using Bricky's modified validation code in the parent's _verify_download function