Incorrect Add-on Structure?
#1
Hi There,

I'm new to making add-on's for kodi. I'm trying to make a very simple add-on that when you click it it opens Kodi player and plays stream

It works as tested as I put in to kodi plugin folder but I can't get the add-on to install by zip. ,I have zipped it up and tried to install it as a zip, but which returned the error that the add-on didn't have the correct structure. how do I fix
zip file was zip up my WinRAR on windows

Here's my file structure and code. Any idea what mistake I'm making?

/plugin.video.thomasiptv.fr
default.py
addon.xml
icon.png

addon.xml

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.thomasiptv.fr"
       name="Thomas Ip TV"
       version="1.0.0"
       provider-name="Thomas Bernard">
  <requires>
   <import addon="kodi.python" version="2.1"/>
  </requires>
  <extension point="kodi.python.pluginsource" library="default.py">
        <provides>video</provides>
  </extension>
  <extension point="kodi.addon.metadata">
    <summary lang="fr">Thomas Bernard's Ip TV</summary>
    <description lang="fr">Thomas Bernard's Ip TV</description>
    <platform>all</platform>
<language>fr</language>
<email>[email protected]</email>
  </extension>
</addon>


default.py

Code:
import kodi, kodigui, xbmcaddon

addon = kodiaddon.Addon('plugin.video.thomasiptv.fr')
title = addon.getAddonInfo('name')
icon = addon.getAddonInfo('icon')
link='http://mystreamgoeshere.m3u8.'

li = kodigui.ListItem(label=title, iconImage=icon, thumbnailImage=icon, path=link)
li.setInfo(type='Video', infoLabels={ "Title": title })
li.setProperty('IsPlayable', 'true')

kodi.Player().play(item=link, listitem=li)



any help/suggestions on how to fix it will be appreciated I been trying for the last few hours trying to get this to work but I always get this error when installing
from zip

Thanks
barkflame
Reply
#2
you should start by replacing 'kodi' with 'xbmc' everywhere in your addon.xml (and default.py):
kodi.python -> xbmc.python
kodi.python.pluginsource -> xbmc.python.pluginsource
kodigui -> xbmcgui
...and so on

if that doesn't fix it, you might want to post a link to your zipfile, so we can test it.
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
#3
Thank you I done that now it coming up with
dependencies not met contact add-on author

here is zip file for you to take a look at as you request as per above --> click to download zip
Reply
#4
assuming you're testing things on kodi helix 14.x
you need to import the correct xbmc.python version.
(2.1 is very old and no longer supported)

<import addon="xbmc.python" version="2.19.0"/>
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
#5
(2015-04-13, 09:33)ronie Wrote: assuming you're testing things on kodi helix 14.x
you need to import the correct xbmc.python version.
(2.1 is very old and no longer supported)

<import addon="xbmc.python" version="2.19.0"/>

Thank you for that works wonders I learned something new
I on my way to making my first add-on
Thanks again
Thomas
Reply

Logout Mark Read Team Forum Stats Members Help
Incorrect Add-on Structure?0