1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-04 15:12:23 -05:00

Fix parsing utf8 data from tvdb and tvrage

This commit is contained in:
adam 2014-11-09 00:49:53 +08:00
parent bd723abc9f
commit af1c16c4da
3 changed files with 5 additions and 5 deletions

View File

@ -68,6 +68,7 @@
* Fix progress sort direction for poster layout view on home page
* Fix invalid use of str() in the Send2Trash library for platforms other
* Fix dropdown confirm dialogs for restart and shutdown
* Fix parsing utf8 data from tvdb and tvrage
### 0.2.1 (2014-10-22 06:41:00 UTC)

View File

@ -619,10 +619,9 @@ class Tvdb:
raise tvdb_error("Bad zip file received from thetvdb.com, could not read it")
else:
try:
return xmltodict.parse(resp.content.strip().encode('utf-8'), postprocessor=process)
except:
return xmltodict.parse(resp.content.strip(), postprocessor=process)
except:
return dict([(u'data', None)])
def _getetsrc(self, url, params=None, language=None):
"""Loads a URL using caching, returns an ElementTree of the source

View File

@ -479,9 +479,9 @@ class TVRage:
if resp.ok:
try:
return xmltodict.parse(resp.content.strip().encode('utf-8'), postprocessor=remap_keys)
except:
return xmltodict.parse(resp.content.strip(), postprocessor=remap_keys)
except:
return dict([(u'data', None)])
def _getetsrc(self, url, params=None):
"""Loads a URL using caching, returns an ElementTree of the source