--- misc/xbmc/plugin.video.todic/default.py 2019/02/28 11:10:40 3251 +++ misc/xbmc/plugin.video.todic/default.py 2019/03/05 10:58:04 3256 @@ -27,6 +27,7 @@ __entrypoint__ = __addon__.getSetting('entrypoint').lower() __backend__ = "https://todic.dk/xbmc.php?xbmckey=" + __key__ + if __entrypoint__ == "alternative": __backend__ = "https://alt.todic.dk/xbmc.php?xbmckey=" + __key__ @@ -214,8 +215,11 @@ def rootMenu(): + kodi_ver = xbmc.getInfoLabel('System.BuildVersion') + plugin_ver = __addon__.getAddonInfo('version') + msgurl = __backend__ + "&action=messages&kodi=" + urllib.quote_plus(kodi_ver) + "&todicplugin=" + urllib.quote_plus(plugin_ver) - msg = open_url(__backend__ + "&action=messages") + msg = open_url(msgurl) msg = msg.strip() if msg != "": @@ -278,7 +282,7 @@ # print "url:" + url # print "thumb:" + thumb listitem = xbmcgui.ListItem( - label=name, label2='test', iconImage='DefaultFolder.png', thumbnailImage=thumb) + label=name, label2='test', iconImage='DefaultFolder.png') listitem.setProperty('Fanart_Image', fanartImage) listitem.addContextMenuItems([('Refresh', 'Container.Refresh')]) @@ -286,7 +290,10 @@ infoLabels = {} infoLabels['title'] = name infoLabels['playcount'] = playcount + if playcount > 0: + listitem.setArt( {'thumb': thumb} ) #not pretty - but at least we can show a different icon for unwatched/watched in kodi18 listitem.setInfo('video', infoLabels) + listitem.setProperty('IsPlayable', 'true') name = name.encode('UTF-8') @@ -366,15 +373,6 @@ player = TodicPlayer() player.play(str(url), listitem) - # kan ikke loade subtitles hvis foerend playeren koerer - count = 0 - while not xbmc.Player().isPlaying(): - xbmc.sleep(250) - count += 1 - if count > 10: - break - - #Holder python kørernde indtil at det bliver bedt om at stoppe while (not xbmc.abortRequested):