问题
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
回答1:
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
- folder with plugin name (ie plugin.program.hello.world)
You don't need a special tool but you may be inadvertently compressing the zip. You could try Keka (or on SourceForge).
回答2:
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
回答3:
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!
回答4:
Unzip and zip the folder again. It worked for me
回答5:
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.
回答6:
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.
回答7:
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)
来源:https://stackoverflow.com/questions/28286113/xbmc-kodi-error-adding-addon-structure-incorrect