2011-09-18, 23:47
i am trying to make it so that when a user clicks a video link to get some links if no valid links are found do not proceed and show a msg box.
this i have working.
but what happens when you click the ok button is you go to next page and nothing is there. Is there anyway to stop that and stay on same page.
tks
this i have working.
Code:
elif mode == 'GetMovieSource':
html = net.http_GET(url).content
match=re.compile('<li class="searchList"><a href="#/mirror/(.+?)" onclick="switchMirror.+?">(.+?)</a>').findall(html)
x = 0
st = 0
streamfound=''
if match:
for url,name in match:
if ValidLinks(name) == 'yes':
x = x + 1
addon.add_directory({'mode' : 'GetLink', 'url' : 'http://tvsearch.co/i/application/ajax.php?op=switchMirror&vid=' + url , 'img' : '' }, name, '')
else:
st = 1
if streamfound == '':
streamfound = name
else:
streamfound = streamfound + ',' + name
if x == 0 and st == 1:
dialog = xbmcgui.Dialog()
dialog.ok('Streams Found', streamfound + ' Stream Found But Not Implemented')
else:
dialog = xbmcgui.Dialog()
dialog.ok('No Streams', 'No Playable Streams Found')
but what happens when you click the ok button is you go to next page and nothing is there. Is there anyway to stop that and stay on same page.
tks