2015-07-29, 16:50
if you could provide a download link to your zipfile, we can have a look at it.
(2015-07-29, 16:44)royle Wrote: Hi, I'm new at developing for kodi and I stumbled upon an annoyance that I'm not able to fix myself, so please help. The quick version of my question is this: How do you compress an add-on so kodi doesn't complain about "incorrect strucure" on install?
The longer version of my problem is here -> I created my own add-on (audio/video plugin) but kodi won't let me install it via zip folder, telling me that the file has an incorrect structure even though I'm quite sure I did everything correct. If I extract the code to add-on folder, it works, kodi just doesn't like the zip... I also tried the Hello world sample and it only installs if i download the original zip file and feed it to kodi. As soon as I unzip/re-zip those same Hello world files, it breaks for some reason. I tried different programs (winzip, winrar, 7zip), operating systems (win 7, linux) and even all kinds of compression types (no/low/high compression) with no success. What am I missing here?
(2015-07-29, 16:50)ronie Wrote: if you could provide a download link to your zipfile, we can have a look at it.
(2015-07-29, 17:39)royle Wrote: After spending 2 days banging my head on it, of course I find the solution just 30 minutes after I spam the forum... It seems that both the zip file AND main folder need to have version number appended to the names, like this: plugin.type.addonname-1.0.0. Previously I only appended "-1.0.0" to the zip file and not to the main folder in it
Thanks ronie for a quick reply though...
(2015-08-31, 13:16)Martijn Wrote: tip:
use addDirectoryItems as that faster in bigger lists/slow hardware[/php]
http://mirrors.xbmc.org/docs/python-docs...ctoryItems
would be nice if you also included
http://mirrors.xbmc.org/docs/python-docs...em-setInfo
(2015-08-08, 09:44)millatyme13 Wrote:(2015-07-29, 16:44)royle Wrote: Hi, I'm new at developing for kodi and I stumbled upon an annoyance that I'm not able to fix myself, so please help. The quick version of my question is this: How do you compress an add-on so kodi doesn't complain about "incorrect strucure" on install?
The longer version of my problem is here -> I created my own add-on (audio/video plugin) but kodi won't let me install it via zip folder, telling me that the file has an incorrect structure even though I'm quite sure I did everything correct. If I extract the code to add-on folder, it works, kodi just doesn't like the zip... I also tried the Hello world sample and it only installs if i download the original zip file and feed it to kodi. As soon as I unzip/re-zip those same Hello world files, it breaks for some reason. I tried different programs (winzip, winrar, 7zip), operating systems (win 7, linux) and even all kinds of compression types (no/low/high compression) with no success. What am I missing here?
(2015-07-29, 16:50)ronie Wrote: if you could provide a download link to your zipfile, we can have a look at it.
(2015-07-29, 17:39)royle Wrote: After spending 2 days banging my head on it, of course I find the solution just 30 minutes after I spam the forum... It seems that both the zip file AND main folder need to have version number appended to the names, like this: plugin.type.addonname-1.0.0. Previously I only appended "-1.0.0" to the zip file and not to the main folder in it
Thanks ronie for a quick reply though...
Can you guys elaborate on this? I download the hello world add-on and install from zip no problem. But if I extract the zip and then compress it again, the new zip file gives me the add-on structure error. Am I corrupting it when I compress/extract? I found out about this error because I took the existing hello world, did a few modifications (small), and then re-zip it for install. No luck.
I have tried changing the folder names (the zip and main folder) to versioning but that didn't help either.
import sys
import xbmcgui
import xbmcplugin
addon_handle = int(sys.argv[1])
xbmcplugin.setContent(addon_handle, 'movies')
art = xbmc.translatePath(os.path.join(ADDON.getAddonInfo('path'),'resources','media/'))
art2 = xbmc.translatePath(os.path.join(ADDON.getAddonInfo('path'),'http://123.456.789.10/resources','media/'))
url = 'http://123.456.789.10/movie1.mp4'
li = xbmcgui.ListItem('Movie_1', art+'Movie_1.jpg')
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)
url = 'http://123.456.789.10/movie2.mkv'
li = xbmcgui.ListItem('Movie_2', art2+'Movie_2.jpg')
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)
xbmcplugin.endOfDirectory(addon_handle)