Kodi Community Forum

Full Version: Help with stupid videos script please
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
ok i have started to make a stupid videos script and so far it will display the videos available , but there are some problems i cant understand:

1.when i press the menu button xbmc just crashes
2.once ive pressed the a button on one of the items it wont let me select anything else.
3.it wont play the video.

please have a look at the script:
click me please
wmvurl is not defined anywhere ... should be self.something to get the scope right.

the menu button looks like it should work if hit first.
so how do i refer to the url that it gets?
in def getstupidurl(self,url):
change

videourl = viedourlre.findall(video_url)
for url in videourl:
print(url[0])
self.descriptiontxt.settext(url[0])

to

videourl = viedourlre.findall(video_url)
for url in videourl:
print(url[0])
self.wmvurl = url[0]
self.descriptiontxt.settext(url[0])

and change

xbmc.play(wmvurl)
to
xbmc.play(self.wmvurl)


the problem is that wmvurl was never set to anything anywhere before you used it. thats bad.