Requesting Kodi Wiki Audio-video add-on tutorial zip file?
#1
Hi all .I recently started to learn how to make kodi addon so my first stop was kodi wiki.

I found Audio-video add-on tutorial and tried to run it but i couldn't find the zip file on their page(http://kodi.wiki/view/Audio-video_add-on_tutorial)
could any one help me install Audio-video add-on tutorial code on kodi?

I have installed the HelloWorld addon that i found its zip file on github.com size. But unfortunately could not find the zip file for aduio-video addon tutorial.
So i tried to replace the following code found on kodi wiki with the code in helloworld addon.py but i get "Error:Script failed!:Hello World" and it did not play the video.( I placed a working video url on the code)

addon.py code:

Code:
import sys
import xbmcgui
import xbmcplugin

addon_handle = int(sys.argv[1])

xbmcplugin.setContent(addon_handle, 'movies')

url = 'http://someremotewebsite/some_video.mp4'
li = xbmcgui.ListItem('My First Video!', iconImage='DefaultVideo.png')
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)

xbmcplugin.endOfDirectory(addon_handle)

xbmc.log error details:
Code:
ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.IndexError'>
                                            Error Contents: list index out of range
                                            Traceback (most recent call last):
                                              File "C:\......\addons\script.hello.world-master\addon.py", line 5, in <module>
                                                addon_handle = int(sys.argv[1])
                                            IndexError: list index out of range
                                            -->End of Python script error report<--

could any one help fix above error or help me find the zip file for Audio-video_add-on_tutorial addon?
Looking forward for replies.Thanks
Reply
#2
That wiki code is for local video files only, I think you also need to insert
li.setProperty('IsPlayable', 'true')


This helped me alot
https://github.com/romanvm/plugin.video....e/releases
Reply
#3
you first need to understand the differences between plugins and scripts.
they don't mix and match. that's where your error comes from.

the hello world example you're using is a script and you're replacing it with plugin specific code, that won't work :-)
the first thing you need to do is fixup bits and pieces in the addon.xml file.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
Thanks guys for reply . So how to run that part of the whole code provided on that tutorial? It says that is enough code to run on kodi!
Reply
#5
there's probably nothing wrong with your python code.
it's your addon.xml file thats causing issues.
so start with creating a proper addon.xml:
http://kodi.wiki/view/Addon.xml
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#6
Hi Ronnie,
How do I insert parsing code that retrieves the list of videostreams in a given category from some site or server?
Can you pls give an example? Thank you. I'm new to python programming and I'm trying to learn as fast as I
can but its becoming confusing. I'm trying to create my first video add on. Thank you in advance!
Reply
#7
@purpletin: You might want to look at scrapers for that. That is a whole different ballgame afaik. But you can look inside all the addon folders and investigate the xml and py files for inspiration.

Forum: http://forum.kodi.tv/forumdisplay.php?fid=147
Wiki: http://kodi.wiki/view/HOW-TO:Write_media_scrapers
Reply
#8
(2015-11-09, 04:40)purpletin Wrote: Hi Ronnie,
How do I insert parsing code that retrieves the list of videostreams in a given category from some site or server?
Can you pls give an example? Thank you. I'm new to python programming and I'm trying to learn as fast as I
can but its becoming confusing. I'm trying to create my first video add on. Thank you in advance!

we have an old howto on the wiki that explains the basics of parsing html and finding url's in the html source-code:
Archive:HOW-TO:Write_plugins_for_XBMC (wiki)
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply

Logout Mark Read Team Forum Stats Members Help
Requesting Kodi Wiki Audio-video add-on tutorial zip file?0