mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 19:42:20 -05:00
Merge pull request #123 from adam111316/feature/FixUtf8OnIndexers
Fix parsing utf8 data from tvdb and tvrage
This commit is contained in:
commit
3dba358dda
@ -68,6 +68,7 @@
|
|||||||
* Fix progress sort direction for poster layout view on home page
|
* Fix progress sort direction for poster layout view on home page
|
||||||
* Fix invalid use of str() in the Send2Trash library for platforms other
|
* Fix invalid use of str() in the Send2Trash library for platforms other
|
||||||
* Fix dropdown confirm dialogs for restart and shutdown
|
* 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)
|
### 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")
|
raise tvdb_error("Bad zip file received from thetvdb.com, could not read it")
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
return xmltodict.parse(resp.content.strip().encode('utf-8'), postprocessor=process)
|
|
||||||
except:
|
|
||||||
return xmltodict.parse(resp.content.strip(), postprocessor=process)
|
return xmltodict.parse(resp.content.strip(), postprocessor=process)
|
||||||
|
except:
|
||||||
|
return dict([(u'data', None)])
|
||||||
|
|
||||||
def _getetsrc(self, url, params=None, language=None):
|
def _getetsrc(self, url, params=None, language=None):
|
||||||
"""Loads a URL using caching, returns an ElementTree of the source
|
"""Loads a URL using caching, returns an ElementTree of the source
|
||||||
|
@ -479,9 +479,9 @@ class TVRage:
|
|||||||
|
|
||||||
if resp.ok:
|
if resp.ok:
|
||||||
try:
|
try:
|
||||||
return xmltodict.parse(resp.content.strip().encode('utf-8'), postprocessor=remap_keys)
|
|
||||||
except:
|
|
||||||
return xmltodict.parse(resp.content.strip(), postprocessor=remap_keys)
|
return xmltodict.parse(resp.content.strip(), postprocessor=remap_keys)
|
||||||
|
except:
|
||||||
|
return dict([(u'data', None)])
|
||||||
|
|
||||||
def _getetsrc(self, url, params=None):
|
def _getetsrc(self, url, params=None):
|
||||||
"""Loads a URL using caching, returns an ElementTree of the source
|
"""Loads a URL using caching, returns an ElementTree of the source
|
||||||
|
Loading…
Reference in New Issue
Block a user