/[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 3262 by torben, Sat Feb 20 10:08:38 2021 UTC revision 3265 by torben, Sat Mar 20 18:35:52 2021 UTC
# Line 3  Line 3 
3    
4  '''  '''
5      Todic plugin for XBMC      Todic plugin for XBMC
6      Version 1.9.0      Version 1.9.4
7  '''  '''
8    
9  import sys  import sys
# Line 18  import xbmcplugin Line 18  import xbmcplugin
18  import urllib  import urllib
19  import urllib.request  import urllib.request
20    
21    import platform
22    
23  # import pprint  # import pprint
24    
25  from xml.dom.minidom import parseString  from xml.dom.minidom import parseString
# Line 198  def SaveFile(path, data): Line 200  def SaveFile(path, data):
200    
201    
202  def open_url(url):  def open_url(url):
203      with urllib.request.urlopen(url) as req:      kodi_ver = xbmc.getInfoLabel('System.BuildVersion')
204        reqobj = urllib.request.Request(
205            url,
206            data=None,
207            headers={
208                'User-Agent': 'TodicKodi:' + str(__addon__.getAddonInfo('version')) + " Kodi:" + str(kodi_ver) + " Platform:" + str(platform.system()) + " " + str(platform.release())
209            }
210        )
211    
212        with urllib.request.urlopen(reqobj) as req:
213          #data = response.read()          #data = response.read()
214          #return data          #return data
215          charset=req.info().get_content_charset()          charset=req.info().get_content_charset()
# Line 332  def play_video(url, name): Line 343  def play_video(url, name):
343          if (savedPosition > 0):          if (savedPosition > 0):
344              dialog = xbmcgui.Dialog()              dialog = xbmcgui.Dialog()
345              #yes / true -afspil fra position              #yes / true -afspil fra position
346              answer = dialog.yesno(heading='Todic', line1='Afspil fra sidste position', nolabel='Fra start', yeslabel='Fortsæt')              answer = dialog.yesno(heading='Todic', message='Afspil fra sidste position', nolabel='Fra start', yeslabel='Fortsæt')
347              if (answer == True):              if (answer == True):
348                  playPosition = savedPosition                  playPosition = savedPosition
349                    

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

  ViewVC Help
Powered by ViewVC 1.1.20