/[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 3252 by torben, Thu Feb 28 11:12:40 2019 UTC revision 3256 by torben, Tue Mar 5 10:58:04 2019 UTC
# Line 27  __key__ = __addon__.getSetting('xbmckey' Line 27  __key__ = __addon__.getSetting('xbmckey'
27  __entrypoint__ = __addon__.getSetting('entrypoint').lower()  __entrypoint__ = __addon__.getSetting('entrypoint').lower()
28  __backend__ = "https://todic.dk/xbmc.php?xbmckey=" + __key__  __backend__ = "https://todic.dk/xbmc.php?xbmckey=" + __key__
29    
30    
31  if __entrypoint__ == "alternative":  if __entrypoint__ == "alternative":
32      __backend__ = "https://alt.todic.dk/xbmc.php?xbmckey=" + __key__      __backend__ = "https://alt.todic.dk/xbmc.php?xbmckey=" + __key__
33    
# Line 214  def open_url_safe(url): Line 215  def open_url_safe(url):
215    
216    
217  def rootMenu():  def rootMenu():
218        kodi_ver = xbmc.getInfoLabel('System.BuildVersion')
219        plugin_ver = __addon__.getAddonInfo('version')
220        msgurl = __backend__ + "&action=messages&kodi=" + urllib.quote_plus(kodi_ver) + "&todicplugin=" + urllib.quote_plus(plugin_ver)
221    
222      msg = open_url(__backend__ + "&action=messages")      msg = open_url(msgurl)
223      msg = msg.strip()      msg = msg.strip()
224    
225      if msg != "":      if msg != "":
# Line 278  def buildList(url, title, endlist=True): Line 282  def buildList(url, title, endlist=True):
282  #               print "url:" + url  #               print "url:" + url
283  #               print "thumb:" + thumb  #               print "thumb:" + thumb
284          listitem = xbmcgui.ListItem(          listitem = xbmcgui.ListItem(
285              label=name, label2='test', iconImage='DefaultFolder.png', thumbnailImage=thumb)              label=name, label2='test', iconImage='DefaultFolder.png')
286          listitem.setProperty('Fanart_Image', fanartImage)          listitem.setProperty('Fanart_Image', fanartImage)
287          listitem.addContextMenuItems([('Refresh', 'Container.Refresh')])          listitem.addContextMenuItems([('Refresh', 'Container.Refresh')])
288    
# Line 286  def buildList(url, title, endlist=True): Line 290  def buildList(url, title, endlist=True):
290              infoLabels = {}              infoLabels = {}
291              infoLabels['title'] = name              infoLabels['title'] = name
292              infoLabels['playcount'] = playcount              infoLabels['playcount'] = playcount
293                if playcount > 0:
294                    listitem.setArt( {'thumb': thumb} ) #not pretty - but at least we can show a different icon for unwatched/watched in kodi18  
295              listitem.setInfo('video', infoLabels)              listitem.setInfo('video', infoLabels)
296                listitem.setProperty('IsPlayable', 'true')
297    
298          name = name.encode('UTF-8')          name = name.encode('UTF-8')
299    

Legend:
Removed from v.3252  
changed lines
  Added in v.3256

  ViewVC Help
Powered by ViewVC 1.1.20