XBMC/KODI error adding addon “structure incorrect”

2019-05-01 19:27发布

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

标签: add-on xbmc kodi
7条回答
孤傲高冷的网名
2楼-- · 2019-05-01 19:32

It depends on the way you zip it. I zipped it using 7zip and I got the error Addon does not have correct structure. After downloading a plugin zip file(any plugin zip file) and replacing the files within it started working fine.

查看更多
3楼-- · 2019-05-01 19:32

Unzip and zip the folder again. It worked for me

查看更多
Emotional °昔
4楼-- · 2019-05-01 19:41

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).

查看更多
Bombasti
5楼-- · 2019-05-01 19:42

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!

查看更多
【Aperson】
6楼-- · 2019-05-01 19:48

I was having this issue and discovered that it was because of web content filtering rules in place on my network that interfered with the requests for the URL (specifically, the .zip)

查看更多
萌系小妹纸
7楼-- · 2019-05-01 19:53

For me the problem was because of the compression of the zip file with the archive utility of Mac OS X. I solved it by writing the following command on the command line:

zip -r -0 nameofthezip.zip nameofthefolder

Using OS X El Capitan 10.11.4 for the compression and the addon is working with Kodi in a Raspberry Pi without problems.

查看更多
登录 后发表回答