2013-08-31, 18:42
I coding about play video, but I have question about if the url for play is incorrect (it seem 'null' string)
how can I make the OK dialog to tell user that this movie have incorrect link
I have dilog code but I don't know where to put it
and this is my play video code
thank you for help!
sry for my bad english.
how can I make the OK dialog to tell user that this movie have incorrect link
I have dilog code but I don't know where to put it
Code:
msg = '[B][COLOR red]{txt}[/COLOR][/B]'.format(
txt=_('no_valid_links'))
plugin.log.error(msg)
dialog = xbmcgui.Dialog()
dialog.ok(api.long_name, msg)
and this is my play video code
Code:
@plugin.route('/play/<url>/')
def play_video(url):
downloads = plugin.get_storage('downloads')
if url in downloads:
local_file = downloads[url]
# download was already started
import xbmcvfs # FIXME: import from swift after fixed there
if xbmcvfs.exists(local_file):
# download was also finished
log('uPlayHD log => Using local file: %s' % local_file)
return plugin.set_resolved_url(local_file)
playable_url = url
log('log => Using URL: %s' % playable_url)
return plugin.set_resolved_url(playable_url)
thank you for help!
sry for my bad english.