--- misc/xbmc/plugin.video.todic/default.py 2021/02/19 21:39:29 3261 +++ misc/xbmc/plugin.video.todic/default.py 2021/02/23 19:19:52 3263 @@ -3,7 +3,7 @@ ''' Todic plugin for XBMC - Version 1.9.0 + Version 1.9.2 ''' import sys @@ -198,9 +198,12 @@ def open_url(url): - with urllib.request.urlopen(url) as response: - data = response.read() - return data + with urllib.request.urlopen(url) as req: + #data = response.read() + #return data + charset=req.info().get_content_charset() + content=req.read().decode(charset) + return content # wraps open url in a catch-all exception handler @@ -222,6 +225,7 @@ msg = msg.strip() if msg != "": + print("[Todic] rootMenu Dialog =" + str(msg)) dialog = xbmcgui.Dialog() dialog.ok('XBMC Todic', msg) @@ -411,7 +415,7 @@ #=================================== Tool Box ======================================= # shows a more userfriendly notification def showMessage(heading, message): - print( "[Todic::showMessage] " + message) + print( "[Todic::showMessage] " + str(message) ) print( message ) duration = 15 * 1000 xbmc.executebuiltin('XBMC.Notification("%s", "%s", %s)' % @@ -478,6 +482,9 @@ except: pass +print( "[Todic] url=" + str(url)) +print( "[Todic] name=" + str(name)) +print( "[Todic] mode=" + str(mode)) try: