2018-08-30, 19:08
Hi All,
I have two video links: the first one is invalid link and the next one is a valid link.
When the invalid link fails, I try to play the next valid link but it does not work. I received the "Playback Failed" dialog, I can "see" my addon goes to play the next link but Kodi does not play the valid link.
My code:
item.setPath(invalid_link)
xbmcplugin.setResolvedUrl(handle=self.plugin, succeeded=True, listitem=item)
xbmc.sleep(5000)
if not xbmc.Player().isPlaying():
# play the next valid link
item.setPath(valid_link)
xbmcplugin.setResolvedUrl(handle=self.plugin, succeeded=True, listitem=item)
But it works if I use xbmc.Player().play(valid_link, item) for the next valid link. I don't want to use xbmc.Player because it doesn't save the video status.
I guess that I have to reset "something" to make setResolvedUrl working again. Please help me to fix this issue.
Thanks a lot in advance for your help.
I have two video links: the first one is invalid link and the next one is a valid link.
When the invalid link fails, I try to play the next valid link but it does not work. I received the "Playback Failed" dialog, I can "see" my addon goes to play the next link but Kodi does not play the valid link.
My code:
item.setPath(invalid_link)
xbmcplugin.setResolvedUrl(handle=self.plugin, succeeded=True, listitem=item)
xbmc.sleep(5000)
if not xbmc.Player().isPlaying():
# play the next valid link
item.setPath(valid_link)
xbmcplugin.setResolvedUrl(handle=self.plugin, succeeded=True, listitem=item)
But it works if I use xbmc.Player().play(valid_link, item) for the next valid link. I don't want to use xbmc.Player because it doesn't save the video status.
I guess that I have to reset "something" to make setResolvedUrl working again. Please help me to fix this issue.
Thanks a lot in advance for your help.