Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XBMC/KODI error adding addon "structure incorrect"

Tags:

add-on

xbmc

kodi

I'm following the KODI/XBMC hello world addon tutorial here and i downloaded the finished project from here but the problem is that i cannot edit it, as ever time I try to add a version that I edited onto KODI it gives me the error Addon does not have correct structure I think it is the way I'm turning it back into a .zip(I am using the archive utility on a macbook air running yostimite), because even if I just unzip it and then without changing anything turn it back into a zip it still gives me that error, so I'm just wondering does anybody know what I'm doing wrong or do I need to use a special tool to make the plugin into a zip

I'm using openelec 5.0 on a raspberry pi B

like image 475
Richard Beattie Avatar asked Feb 02 '15 20:02

Richard Beattie


3 Answers

You will need to set it up like this:

  • zip (name doesn't matter)
    • folder with plugin name (ie plugin.program.hello.world)
      • plugin files including addon.xml, LICENSE.txt, changelog.txt, icon.png, etc

You don't need a special tool but you may be inadvertently compressing the zip. You could try Keka (or on SourceForge).

like image 173
Enigma Avatar answered Oct 18 '22 06:10

Enigma


Although others have already raised the zip issue I feel my contribution brings enough new information to justify a new answer.

I recently faced the same issue. I created my Kodi plugin on a MacBook Pro (El Cap v10.11.1, Late 2013) and zipped the directory via Right-Click --> Compress and everything worked fine. I then started working on a different MacBook (El Cap, v10.11.2, Late 2013), made some changes and created the zip file the same way and I started getting the error.

After a few frustrating hours it occurred to me to analyse the zip structure. I used the following command: $ zipinfo script.service.autorun.zip and this is what I got:

// v10.11.1
Archive:  script.service.autorun.zip   1376 bytes   4 files
script.service.autorun/
script.service.autorun/addon.py
script.service.autorun/addon.xml
script.service.autorun/changelog.txt
4 files, 1328 bytes uncompressed, 646 bytes compressed:  51.4%

// v10.11.2
Archive:  script.service.autorun.zip   3060 bytes   10 files
script.service.autorun/
script.service.autorun/addon.py
__MACOSX/
__MACOSX/script.service.autorun/
__MACOSX/script.service.autorun/._addon.py
script.service.autorun/addon.xml
__MACOSX/script.service.autorun/._addon.xml
script.service.autorun/changelog.txt
__MACOSX/script.service.autorun/._changelog.txt
__MACOSX/._script.service.autorun
10 files, 2222 bytes uncompressed, 1230 bytes compressed:  44.6%

So, obviously, something changed in v10.11.2 but I couldn't find any documentation about it.

The solution for me was to manually zip the directory:

zip -r script.service.autorun.zip script.service.autorun/

Hope this helps!

like image 4
LuisCien Avatar answered Oct 18 '22 07:10

LuisCien


I've been struggling with the same error - structure incorrect, while installing from zip file to Isengard 15.2.

Basically I'm downloading the zip file from a git repository and then trying to install.

I found the following:

addon.xml - if it has a newline on the end, that breaks things!

I can confirm what ryzhiy said in his comment above - if you try to install once and get the "incorrect structure" error then, even when you've fixed things, you will often get the same error with the same zipfile until you restart. Not sure why.

Hope this helps someone. I was able to fix mine by removing the newline from the en

like image 3
James Thorpe Avatar answered Oct 18 '22 07:10

James Thorpe