Kodi Community Forum
problem in my addon script - 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: problem in my addon script (/showthread.php?tid=273435)



problem in my addon script - Dicky142 - 2016-05-11

Quote:def GetContent(url,iconimage):
link=open_url(url)
match= re.compile('<link>(.+?)</link><thumbnail>(.+?)</thumbnail><title>(.+?)</title>').findall(link)
for url,iconimage,name in match:
if not 'http' in iconimage:iconimage=icon
if '############' in url:
addDir(name,url,1,iconimage,fanart)
if '/tube.txt/' in url:
addDir(name,url,35,iconimage,fanart)
else :
addLink(name,url,2,iconimage,fanart):

Im trying to find some reading regarding syntax errors in kodi / python, iv and error in the bottom three lines of that passage and i cant for the life of me figure it out..

Any pointers towards reading on this subject would be much appreciated, iv tried Google and iv searched the forums and cant find a thing, unless i'm missing something..

Regards Ian


RE: problem in my addon script - Torben - 2016-05-11

Looks like tabs arw missing. If you call tje script from a skin you will see a very detailed errordescription in the kodi log file.

Also. Semicolon at the very end needs to go.


RE: problem in my addon script - ronie - 2016-05-11

please use the [ code ] tags and not the [ quote ] tags when you post a piece of code.
the code tags will preserve indenting, which is important for python code.

also, post the error you get, that will provide us with some pointers on what is wrong.