278 |
# print "url:" + url |
# print "url:" + url |
279 |
# print "thumb:" + thumb |
# print "thumb:" + thumb |
280 |
listitem = xbmcgui.ListItem( |
listitem = xbmcgui.ListItem( |
281 |
label=name, label2='test', iconImage='DefaultFolder.png', thumbnailImage=thumb) |
label=name, label2='test', iconImage='DefaultFolder.png') |
282 |
listitem.setProperty('Fanart_Image', fanartImage) |
listitem.setProperty('Fanart_Image', fanartImage) |
283 |
listitem.addContextMenuItems([('Refresh', 'Container.Refresh')]) |
listitem.addContextMenuItems([('Refresh', 'Container.Refresh')]) |
284 |
|
|
286 |
infoLabels = {} |
infoLabels = {} |
287 |
infoLabels['title'] = name |
infoLabels['title'] = name |
288 |
infoLabels['playcount'] = playcount |
infoLabels['playcount'] = playcount |
289 |
|
if playcount > 0: |
290 |
|
listitem.setArt( {'thumb': thumb} ) #not pretty - but at least we can show a different icon for unwatched/watched in kodi18 |
291 |
listitem.setInfo('video', infoLabels) |
listitem.setInfo('video', infoLabels) |
292 |
|
listitem.setProperty('IsPlayable', 'true') |
293 |
|
|
294 |
name = name.encode('UTF-8') |
name = name.encode('UTF-8') |
295 |
|
|
369 |
player = TodicPlayer() |
player = TodicPlayer() |
370 |
player.play(str(url), listitem) |
player.play(str(url), listitem) |
371 |
|
|
|
# kan ikke loade subtitles hvis foerend playeren koerer |
|
|
count = 0 |
|
|
while not xbmc.Player().isPlaying(): |
|
|
xbmc.sleep(250) |
|
|
count += 1 |
|
|
if count > 10: |
|
|
break |
|
|
|
|
|
|
|
372 |
|
|
373 |
#Holder python kørernde indtil at det bliver bedt om at stoppe |
#Holder python kørernde indtil at det bliver bedt om at stoppe |
374 |
while (not xbmc.abortRequested): |
while (not xbmc.abortRequested): |