A strange behavior with the Hello World example
#1
Hello,
Newbie here:

I got this Hello world addon from the wiki page downloaded into a temp folder. I was able to install it succesfully and see it working. With that first phase accomplished I thought that it was time to start modifying my little addon. Not a single time I've been able to install anything if I have it modified first. Not matter how simple the modification is. After hours of trying to find a difference between my modified code and the one downloaded from the wiki I realized that it was vi and kodi who were making me look bad. How? Please see the sequence of events below:

1-Get original zip file from the wiki page
2-mkdir -p /tmp/script.hello.world-master
3-Unzip content of the original zip file into /tmp/script.hello.world-master
4-cd /tmp/script.hello.world-master
5-Open addon.py with vi (I am not using .vimrc)
6-:wq (yes, just save it and quit, no changes at all)
7-cd /tmp
8-zip script.hello.world-master.zip ./script.hello.world-master/*
9-Get to Kodi and install from zip (/tmp/script.hello.world-master.zip)
10-Message from Kodi that the structure is not correct. Could not install Addon

If I do the exact same steps except number 6, Kodi installs perfectly. I was able to set vi with Confusedet binary | set noeol and then :wq does not affect the file. But if I even try to change one single character from the file ( Hello world versus Hello Wolrd, for instance) Kodi will complain.

I've browsed and googled till exhaution but I can't find anything like this. I can't believe Kodi might be such a prima donna but it is behaving like one ;-)


Any idea would be immensely appreciated.
Thank you very much!
Andres

PS: So you can have an idea how crazy this is: I got addon.py without modification into a hex editor, I modified a copy of addon.py in such a way that only added an extra space between Hello and World, opened in another hex editor and I could see that the only difference between the two files was the extra byte added with the corresponding 0x20 of the added space. There was no more differences, but that was enough for Kodi to complain and refuse to install the addon
Reply
#2
I noticed that there is <source> inside the addon.xml. Is that tag used by Kodi in some kind of code validation process?
Reply
#3
Solved: Edition/Modification of the addon should be done after it is already installed by Kodi. In this case the file is found in $HOME/.kodi/addon/script.hello.world-master. No need to restart Kodi, just launch the addon agan and the change takes effect right away.

Moral story: RTFM!
Reply

Logout Mark Read Team Forum Stats Members Help
A strange behavior with the Hello World example0