]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
fanart: Fix decode error.
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Tue, 14 May 2019 16:50:14 +0000 (17:50 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 20 May 2019 16:36:22 +0000 (18:36 +0200)
The text returned from the server is utf-8 so needs an explicit
decode otherwise it defaults to ASCII and fails for programmes
with non-ASCII titles.

support/tvhmeta

index ae205fee9c22f7e27311a388b5e2f6317d65c1b4..4111ca6c43cee419ec0313e348b7d289f3979273 100755 (executable)
@@ -148,7 +148,8 @@ class TvhMeta(object):
 
     logging.info("Sending %s to %s" % (data, full_url))
     req = urlopen(full_url, data=bytearray(data, 'utf-8'))
-    ret = req.read().decode()
+    resp = req.read();
+    ret = resp.decode('utf-8', errors='replace')
     logging.debug("Received: %s", ret)
     return ret