--- misc/xbmc/plugin.video.todic/default.py 2019/02/28 11:10:40 3251 +++ misc/xbmc/plugin.video.todic/default.py 2019/03/10 21:37:47 3259 @@ -3,7 +3,7 @@ ''' Todic plugin for XBMC - Version 1.7.3 + Version 1.8.1 ''' import sys @@ -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__ @@ -35,7 +36,7 @@ print( "[Todic] entrypoint: " + __entrypoint__ ) print( "[Todic] backend: " + __backend__ ) - +print( "[Todic] version: " + __addon__.getAddonInfo('version') ) fanartImage = os.path.join(__addon__.getAddonInfo('path'), 'movie_bg_blur.jpg') datapath = xbmc.translatePath( @@ -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,6 +290,8 @@ 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) name = name.encode('UTF-8') @@ -366,15 +372,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):