The Trakt Plus module has recently begun returning "broken" thumbnails for all shows and movies. Looking at the contents of the actual .jpg files in the cache/trakt/shows/ and cache/trakt/movies/ directories, they're full of HTML.
This PR fixes the CloudFlare 1010 error by faking a User-Agent header when making the request for thumbnail images from Trakt.tv. I've switched to urllib2 for downloading the thumbnail images, as urllib doesn't support headers (as far as I can tell).
The Trakt Plus module has recently begun returning "broken" thumbnails for all shows and movies. Looking at the contents of the actual .jpg files in the cache/trakt/shows/ and cache/trakt/movies/ directories, they're full of HTML.
The HTML was generated by CloudFlare, and is an Access Denied: Error 1010 error.
This PR fixes the CloudFlare 1010 error by faking a User-Agent header when making the request for thumbnail images from Trakt.tv. I've switched to urllib2 for downloading the thumbnail images, as urllib doesn't support headers (as far as I can tell).