Kodi Community Forum
Help with stupid videos script please - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Help with stupid videos script please (/showthread.php?tid=9094)



- nishil - 2005-01-13

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


- Asteron - 2005-01-14

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.


- nishil - 2005-01-14

so how do i refer to the url that it gets?


- Asteron - 2005-01-14

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.