Help with correcting the structure of my addon

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
toxicious Offline
Junior Member
Posts: 36
Joined: Oct 2011
Reputation: 0
Location: Sweden
Post: #1
I have made a minimalistic addon which I am unable to get the right structure on, XBMC complains when I install it as a zip that the structure is faulty. I have no idea what is wrong Huh

The addon is attached, I would be very happy if anyone could take a quick look at it, I have probably done a newbie error Smile

Here is the addon (can't find the attach button?):
http://www.mediafire.com/?g96tv2815ij9bb6
(This post was last modified: 2012-04-08 23:57 by toxicious.)
find quote
giftie Offline
Skilled Python Coder
Posts: 2,359
Joined: Mar 2010
Reputation: 54
Location: Calgary, Alberta
Post: #2
Your addon.xml is missing a few things. The <requires> and the <provides>

Corrected below
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.osswitcher"
       name="OS Switcher"
       version="1.0"
       provider-name="toxicious">
  <requires>
    <import addon="xbmc.python" version="2.0"/>
  </requires>
  <extension point="xbmc.python.script"
             library="default.py">
  </extension>
  <extension point="xbmc.addon.metadata">
    <summary lang="en">Switch OS with the click of a button</summary>
    <description lang="en">Switch to a second OS by the press of a button with this addon. </description>
    <disclaimer lang="en">Remember to set the number of the OS (grub's number) and the sudo password in the addon settings.</disclaimer>
    <platform>linux</platform>
  </extension>
</addon>

So far, that's all I see...

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


(This post was last modified: 2012-04-10 01:23 by giftie.)
find quote
toxicious Offline
Junior Member
Posts: 36
Joined: Oct 2011
Reputation: 0
Location: Sweden
Post: #3
Thanks for correcting that, didn't even know I needed a "require" for the python code.
The "provides" tag is undocumented at the wiki, so maybe someone with a little knowledge on what it does should change that Smile

Though the addon still refuses to install, same error as before (structure). So there must be something else wrong. What structure does it check, is it only the addon,xml or does it check the files and so on too?
find quote
Martijn Offline
Team-XBMC
Posts: 10,985
Joined: Jul 2011
Reputation: 158
Location: Dawn of time
Post: #4
It also checks the .zip file structure.
Grab a zip file from another plugin and see how it's done

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

For your mediacenter artwork go to
[Image: fanarttv.png]
find quote
toxicious Offline
Junior Member
Posts: 36
Joined: Oct 2011
Reputation: 0
Location: Sweden
Post: #5
Done that, but I can't see any errors Sad
God dammit, why can't xbmc just tell me what the fault is?
find quote
Bstrdsmkr Offline
Posting Freak
Posts: 803
Joined: Oct 2010
Reputation: 17
Post: #6
It may not know what the error is. It looks for a few specific things (which are different depending on your addon.xml) and if it doesn't find them, it has no idea where else to look.

In your case, I think leave out the <provides> tag and see what happens
find quote
giftie Offline
Skilled Python Coder
Posts: 2,359
Joined: Mar 2010
Reputation: 54
Location: Calgary, Alberta
Post: #7
(2012-04-10 00:26)Bstrdsmkr Wrote:  It may not know what the error is. It looks for a few specific things (which are different depending on your addon.xml) and if it doesn't find them, it has no idea where else to look.

In your case, I think leave out the <provides> tag and see what happens

Good find.. I just tested his script on my system, installed fine.. Strange how my script has the <provides>(where I took the info from), I think is it a left over from early Dharma... I changed the addon.xml that I posted that is equivalant to the one that successfully installed(just incase someone falls on this thread in the future.)

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


(This post was last modified: 2012-04-10 01:26 by giftie.)
find quote
Bstrdsmkr Offline
Posting Freak
Posts: 803
Joined: Oct 2010
Reputation: 17
Post: #8
Lucky guess lol. I hadn't seen it set like that before and my addons work fine without it so I figured it was worth a shot lol
find quote
menno Offline
Senior Member
Posts: 197
Joined: Jun 2009
Reputation: 0
Post: #9
Could anybody help with mine? I got the same error tried everything;
http://www.***.nl/script.video.sopcast-r...server.zip

Never mind, got it~!!!
(This post was last modified: 2013-08-11 00:39 by menno.)
find quote