Need help to figure why "Add-on does not have the correct structure"
#1
Hi,

I try to install an alpha of a self-developed scraper from a zip file.
Kodi (or XBMC, tried last version, too) won't go beyond telling me "Add-on does not have the correct structure".

The scraper xml runs fine in ScraperEdit.

The folder structure of the zipped archive is:
-metadata.movies.tvspielfilm.de
--addon.xml
--icon.png
--tvspielfilmde.xml

System is Mac OS 10.10.2.

Details of the xml files below.

Thanks for every hint!
y


The addon.xml reads:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="metadata.movies.tvspielfilm.de"
       name="TV Spielfilm Filmarchiv Scraper"
       version="0.0.1"
       provider-name="N. N.">
  <requires>
    <import addon="xbmc.metadata" version="2.1.0"/>
  </requires>
  <extension point="xbmc.metadata.scraper.library"
             library="tvspielfilmde.xml"/>
  <extension point="xbmc.addon.metadata">
    <platform>all</platform>
    <language>de</language>
    <summary lang="de">TV Spielfilm Filmarchiv Scraper Library</summary>
    <description lang="de">Suche und Download von Metadaten vom TV Spielfilm Filmarchiv (tvspielfilm.de)</description>
  </extension>
</addon>

And the scraper (tvspielfilmde.xml) reads:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<scraper thumb="icon.png" date="2015-02-12" content="movies" framework="1.1" name="TV Spielfilm Filmarchiv">
    <NfoUrl dest="3">
        <RegExp dest="3" output="\1" input="$$1">
            <expression></expression>
        </RegExp>
    </NfoUrl>
    <CreateSearchUrl dest="3">
        <RegExp dest="3" output="&lt;url spoof=&quot;http://www.google.de&quot;&gt;http://www.tvspielfilm.de/kino/filmarchiv/suche/?q=\1&lt;/url&gt;" input="$$1">
            <expression clear="yes" trim="1" encode="1"></expression>
        </RegExp>
    </CreateSearchUrl>
    <GetSearchResults dest="8">
        <RegExp dest="8" output="&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot; standalone=&quot;yes&quot;?&gt;&lt;results&gt;\1&lt;/results&gt;" input="$$5">
            <RegExp dest="5" output="&lt;entity&gt;&lt;title&gt;\3. \2. \4&lt;/title&gt;&lt;url&gt;\1&lt;/url&gt;&lt;/entity&gt;" input="$$1">
                <expression clear="yes" repeat="yes">&lt;article class="post"&gt;[\n \t]*&lt;a href="(http://www\.tvspielfilm\.de/kino/filmarchiv/film/[^\n]+,[0-9]+,ApplicationMovie\.html)[^&lt;]*&lt;img src[^&lt;]*&lt;div [^&lt;]*&lt;span class="sub-title"&gt;([^&lt;]*)&lt;/span&gt;[^&lt;]*&lt;h3&gt;([^&lt;]*)&lt;/h3&gt;[^&lt;]*&lt;p&gt;([^&lt;]*)&lt;/p&gt;</expression>
            </RegExp>
            <expression noclean="1"></expression>
        </RegExp>
    </GetSearchResults>
    <GetDetails dest="3">
        <RegExp dest="3" output="&lt;details&gt;\1&lt;/details&gt;" input="$$8">
            <RegExp dest="8" output="&lt;title&gt;\1&lt;/title&gt;" input="$$1">
                <expression noclean="1" trim="1">&lt;h1 class="film-title"&gt;([^&lt;]*)&lt;/h1&gt;</expression>
            </RegExp>
            <RegExp dest="8+" output="&lt;votes&gt;\1&lt;/votes&gt;" input="$$6">
                <RegExp dest="6" output="\1 \2/3   " input="$$1">
                    <expression clear="yes" repeat="yes" noclean="1" trim="1">&lt;li[^&lt;]*&lt;span&gt;([^&lt;]*)&lt;/span&gt;[^&lt;]*&lt;ul class="red-br-rating"&gt;[^&lt;]*&lt;li class="active([0-3])"&gt;&lt;/li&gt;</expression>
                </RegExp>
                <RegExp dest="6+" output="TVS: \1   " input="$$1">
                    <expression noclean="1" trim="1">&lt;div class="editorial-rating big([1-3])"&gt;&lt;/div&gt;</expression>
                </RegExp>
                <RegExp dest="6+" output="Community: \2/5   " input="$$1">
                    <expression noclean="2" trim="2">&lt;li[^&lt;]*&lt;span&gt;([^&lt;]*)&lt;/span&gt;[^&lt;]*&lt;ul class="community-rating"&gt;[^&lt;]*&lt;li class="active([0-5])"&gt;&lt;/li&gt;</expression>
                </RegExp>
                <expression noclean="1"></expression>
            </RegExp>
            <RegExp dest="8+" output="&lt;tagline&gt;\1&lt;/tagline&gt;&lt;outline&gt;\2&lt;/outline&gt;" input="$$1">
                <expression noclean="1" trim="1">&lt;div class="description-text"&gt;[^&lt;]*&lt;h3&gt;([^&lt;]*)&lt;/h3[^&lt;]*&lt;p&gt;([^&lt;]*)&lt;/p&gt;</expression>
            </RegExp>
            <RegExp dest="8+" output="\1" input="$$7">
                <RegExp dest="7" output="&lt;genre&gt;\2&lt;/genre&gt;" input="$$1">
                    <expression clear="yes" noclean="2" trim="2">&lt;dt&gt;Genre:?&lt;/dt&gt;[^&lt;]*&lt;dd&gt;([^&lt;]*&lt;a [^&gt;]*&gt;)?([^&lt;]*)(&lt;/a&gt;)?&lt;(dt|[^&gt;]*)&gt;</expression>
                </RegExp>
                <RegExp dest="7+" output="&lt;originaltitle&gt;\2&lt;/originaltitle&gt;" input="$$1">
                    <expression noclean="2" trim="2">&lt;dt&gt;Originaltitel:?&lt;/dt&gt;[^&lt;]*&lt;dd&gt;([^&lt;]*&lt;a [^&gt;]*&gt;)?([^&lt;]*)(&lt;/a&gt;)?&lt;(dt|[^&gt;]*)&gt;</expression>
                </RegExp>
                <RegExp dest="7+" output="&lt;country&gt;\2&lt;/country&gt;" input="$$1">
                    <expression noclean="2" trim="2">&lt;dt&gt;Land:?&lt;/dt&gt;[^&lt;]*&lt;dd&gt;([^&lt;]*&lt;a [^&gt;]*&gt;)?([^&lt;]*)(&lt;/a&gt;)?&lt;(dt|[^&gt;]*)&gt;</expression>
                </RegExp>
                <RegExp dest="7+" output="&lt;year&gt;\2&lt;/year&gt;" input="$$1">
                    <expression noclean="2" trim="2">&lt;dt&gt;Jahr:?&lt;/dt&gt;[^&lt;]*&lt;dd&gt;([^&lt;]*&lt;a [^&gt;]*&gt;)?([^&lt;]*)(&lt;/a&gt;)?&lt;(dt|[^&gt;]*)&gt;</expression>
                </RegExp>
                <RegExp dest="7+" output="&lt;runtime&gt;\2&lt;/runtime&gt;" input="$$1">
                    <expression noclean="2" trim="2">&lt;dt&gt;Länge:?&lt;/dt&gt;[^&lt;]*&lt;dd&gt;([^&lt;]*&lt;a [^&gt;]*&gt;)?([^&lt;]*)(&lt;/a&gt;)?&lt;(dt|[^&gt;]*)&gt;</expression>
                </RegExp>
                <RegExp dest="7+" output="&lt;rating&gt;\2&lt;/rating&gt;" input="$$1">
                    <expression noclean="2" trim="2">&lt;dt&gt;Altersfreigabe:?&lt;/dt&gt;[^&lt;]*&lt;dd&gt;([^&lt;]*&lt;a [^&gt;]*&gt;)?([^&lt;]*)(&lt;/a&gt;)?&lt;(dt|[^&gt;]*)&gt;</expression>
                </RegExp>
                <RegExp dest="7+" output="&lt;director&gt;\2&lt;/director&gt;" input="$$1">
                    <expression noclean="2" trim="2">&lt;dt&gt;Regie:?&lt;/dt&gt;[^&lt;]*&lt;dd&gt;([^&lt;]*&lt;a [^&gt;]*&gt;)?([^&lt;]*)(&lt;/a&gt;)?&lt;(dt|[^&gt;]*)&gt;</expression>
                </RegExp>
                <expression repeat="yes" noclean="1" trim="1"></expression>
            </RegExp>
            <RegExp dest="8+" output="&lt;actor&gt;&lt;name&gt;\2&lt;/name&gt;&lt;role&gt;\4&lt;/role&gt;&lt;/actor&gt;" input="$$1">
                <expression repeat="yes" noclean="2" trim="2">&lt;span class="name"&gt;([^&lt;]*&lt;a [^&gt;]*&gt;)?([^&lt;]*)(&lt;/a&gt;)?[^&lt;]*&lt;/span&gt;[^&lt;]*&lt;span class="role"&gt;([^&lt;]*)&lt;/span&gt;</expression>
            </RegExp>
            <expression noclean="1"></expression>
        </RegExp>
    </GetDetails>
</scraper>
Reply
#2
Watch out for broken osx adding useless __macosx folders inside your zip file.
Reply
#3
(2015-02-17, 09:33)ironic_monkey Wrote: Watch out for broken osx adding useless __macosx folders inside your zip file.

Thanks, ironic_monkey! You got me on the right track. Smile
There were no hidden folders, but when trying to create the zip in Windows to test your idea the solution popped up.

Issue lies with the zip creation of the Mac's Finder.

I then tested creating the zip in various ways, with and without having the Mac's .DS_Store file (the only Mac system thingy in the addon folder).
Results:
Mac - in Finder - archive type compressed* : fail, with and without .DS_Store
Mac - in Finder - archive type normal* ('standard' on an English OS?): fail,with and without .DS_Store
Mac - in Finder - archive type zip*: fail, with and without .DS_Store
Mac - Keka (panel 'zip'): success, with and without .DS_Store
Windows - send to > zip: success, with and without .DS_Store

* can be set in preference pane "Archive", to be enabled via Onyx or other tricks.


Now I'm stuck at the next step: my scraper appears enabled in Kodi's Information Libraries, but not in Movie informations where it should go. So it's not accessible in a movie source. Sad

Thanks again!
y
Reply
#4
right, .DS_Store was the folder i was on about, couldn't recall the name Smile the reason it behaves that funky is that it depends on the order inside the zip file - code checks the first folder it encounters...

make sure you have extended the correct extension point - a scraper library is not a scraper, that's a library to be used by scrapers. you have to extend xbmc.metadata.scraper.movies
Reply
#5
(2015-02-17, 18:15)ironic_monkey Wrote: you have to extend xbmc.metadata.scraper.movies


THAT's it! Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
Need help to figure why "Add-on does not have the correct structure"0