2014-07-09, 06:01
When i use this function to set the subtitle file for the player, i can't stop player(), after stop it, it auto replay, and forever :
Code:
def play(url, play=False):
playlist = xbmc.PlayList(1)
playlist.clear()
thumb=''
info = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=thumb)
playlist.add(url, info)
fname="sub.srt"
subtitle=xbmc.translatePath( os.path.join( home, fname ))
xbmc.Player().play(playlist)
xbmc.Player().setSubtitles(subtitle.encode("utf-8"))