Private GIT

Skip to content
Snippets Groups Projects
Commit 93e2d977 authored by miigotu's avatar miigotu
Browse files

Merge pull request #2823 from SiCKRAGETV/bugfix-emmerdale

Make sure to replace  , and make sure _cleanData in tvdbapi is o…
parents 170aa5ec e2f6b1b9
No related branches found
No related tags found
No related merge requests found
...@@ -617,12 +617,12 @@ class Tvdb: ...@@ -617,12 +617,12 @@ class Tvdb:
zipdata = StringIO.StringIO() zipdata = StringIO.StringIO()
zipdata.write(resp.content) zipdata.write(resp.content)
myzipfile = zipfile.ZipFile(zipdata) myzipfile = zipfile.ZipFile(zipdata)
return xmltodict.parse(myzipfile.read('%s.xml' % language), postprocessor=process) return xmltodict.parse(myzipfile.read('%s.xml' % language).replace(' ',' '), postprocessor=process)
except zipfile.BadZipfile: except zipfile.BadZipfile:
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.decode('utf-8'), postprocessor=process) return xmltodict.parse(resp.content.decode('utf-8').replace(' ',' '), postprocessor=process)
except: except:
return dict([(u'data', None)]) return dict([(u'data', None)])
...@@ -671,7 +671,8 @@ class Tvdb: ...@@ -671,7 +671,8 @@ class Tvdb:
- Replaces & with & - Replaces & with &
- Trailing whitespace - Trailing whitespace
""" """
data = data.replace(u"&", u"&")
data = unicode(data).replace(u"&", u"&")
data = data.strip() data = data.strip()
return data return data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment