summaryrefslogtreecommitdiffstats
path: root/abs/core/mythtv/stable-0.27/mythtv/tmdb_error25.patch
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2015-11-11 19:11:47 (GMT)
committerBritney Fransen <brfransen@gmail.com>2015-11-11 19:11:47 (GMT)
commitbb42bd1ad2bd4fc6a934cee3279560b561008859 (patch)
treef2c4e2dc5435a4f0f0cf1f152f3f95b2be3fc210 /abs/core/mythtv/stable-0.27/mythtv/tmdb_error25.patch
parentcf6fc29dc84d73151889db20be3fe4614c756f36 (diff)
downloadlinhes_pkgbuild-bb42bd1ad2bd4fc6a934cee3279560b561008859.zip
linhes_pkgbuild-bb42bd1ad2bd4fc6a934cee3279560b561008859.tar.gz
linhes_pkgbuild-bb42bd1ad2bd4fc6a934cee3279560b561008859.tar.bz2
mythtv & mythplugins: update to latest -fixes
mythtv: update tmdb error 25 patch
Diffstat (limited to 'abs/core/mythtv/stable-0.27/mythtv/tmdb_error25.patch')
-rw-r--r--abs/core/mythtv/stable-0.27/mythtv/tmdb_error25.patch55
1 files changed, 0 insertions, 55 deletions
diff --git a/abs/core/mythtv/stable-0.27/mythtv/tmdb_error25.patch b/abs/core/mythtv/stable-0.27/mythtv/tmdb_error25.patch
deleted file mode 100644
index fc1a2fe..0000000
--- a/abs/core/mythtv/stable-0.27/mythtv/tmdb_error25.patch
+++ /dev/null
@@ -1,55 +0,0 @@
---- src/mythtv/bindings/python/tmdb3/tmdb3/request.py.orig 2015-09-29 16:11:52.436024705 +0000
-+++ src/mythtv/bindings/python/tmdb3/tmdb3/request.py 2015-09-29 16:13:24.297824407 +0000
-@@ -16,6 +16,7 @@
- import urllib2
- import json
- import os
-+import time
-
- DEBUG = False
- cache = Cache(filename='pytmdb3.cache')
-@@ -113,21 +114,29 @@
- def readJSON(self):
- """Parse result from specified URL as JSON data."""
- url = self.get_full_url()
-- try:
-- # catch HTTP error from open()
-- data = json.load(self.open())
-- except TMDBHTTPError, e:
-- try:
-- # try to load whatever was returned
-- data = json.loads(e.response)
-- except:
-- # cannot parse json, just raise existing error
-- raise e
-- else:
-- # response parsed, try to raise error from TMDB
-- handle_status(data, url)
-- # no error from TMDB, just raise existing error
-- raise e
-+ while True:
-+ try:
-+ # catch HTTP error from open()
-+ data = json.load(self.open())
-+ break
-+ except TMDBHTTPError, e:
-+ try:
-+ # try to load whatever was returned
-+ data = json.loads(e.response)
-+ except:
-+ # cannot parse json, just raise existing error
-+ raise e
-+ else:
-+ # Check for error code of 25 which means we are doing more than 40 requests per minute.
-+ if data.get('status_code', 1) == 25:
-+ # Sleep and retry query.
-+ time.sleep(10)
-+ continue
-+ else:
-+ # response parsed, try to raise error from TMDB
-+ handle_status(data, url)
-+ # no error from TMDB, just raise existing error
-+ raise e
- handle_status(data, url)
- if DEBUG:
- import pprint