/[projects]/misc/xbmc/plugin.video.todic/default.py
ViewVC logotype

Diff of /misc/xbmc/plugin.video.todic/default.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3261 by torben, Fri Feb 19 21:39:29 2021 UTC revision 3262 by torben, Sat Feb 20 10:08:38 2021 UTC
# Line 198  def SaveFile(path, data): Line 198  def SaveFile(path, data):
198    
199    
200  def open_url(url):  def open_url(url):
201      with urllib.request.urlopen(url) as response:      with urllib.request.urlopen(url) as req:
202          data = response.read()          #data = response.read()
203          return data          #return data
204            charset=req.info().get_content_charset()
205            content=req.read().decode(charset)
206            return content
207    
208    
209  # wraps open url in a catch-all exception handler  # wraps open url in a catch-all exception handler
# Line 222  def rootMenu(): Line 225  def rootMenu():
225      msg = msg.strip()      msg = msg.strip()
226    
227      if msg != "":      if msg != "":
228            print("[Todic] rootMenu Dialog =" + str(msg))
229          dialog = xbmcgui.Dialog()          dialog = xbmcgui.Dialog()
230          dialog.ok('XBMC Todic', msg)          dialog.ok('XBMC Todic', msg)
231    
# Line 411  def searchSeries(): Line 415  def searchSeries():
415  #=================================== Tool Box =======================================  #=================================== Tool Box =======================================
416  # shows a more userfriendly notification  # shows a more userfriendly notification
417  def showMessage(heading, message):  def showMessage(heading, message):
418      print( "[Todic::showMessage] " + message)      print( "[Todic::showMessage] " + str(message) )
419      print( message )      print( message )
420      duration = 15 * 1000      duration = 15 * 1000
421      xbmc.executebuiltin('XBMC.Notification("%s", "%s", %s)' %      xbmc.executebuiltin('XBMC.Notification("%s", "%s", %s)' %
# Line 478  try: Line 482  try:
482  except:  except:
483      pass      pass
484    
485    print( "[Todic] url=" + str(url))
486    print( "[Todic] name=" + str(name))
487    print( "[Todic] mode=" + str(mode))
488    
489    
490  try:  try:

Legend:
Removed from v.3261  
changed lines
  Added in v.3262

  ViewVC Help
Powered by ViewVC 1.1.20