Private GIT

Skip to content
Snippets Groups Projects
Commit af1c16c4 authored by adam's avatar adam
Browse files

Fix parsing utf8 data from tvdb and tvrage

parent bd723abc
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment