xAnt export to multiple databases

Xlobby plugin development

xAnt export to multiple databases

Postby dalanik on Sat Apr 05, 2008 2:07 pm

Hope someone from the french team can help with this one :-)

I've been using xAnt for ages, then on advice of someone from French Team, added sections to xant.ini to separate adult/normal movies, like this:

Code: Select all
[Movies]
input=d:\htpc\ant\catalogue\movies.amc
output=c:\program files\xlobby\databases\movies.xml
images=d:\htpc\ant\images\
sort=$$ITEM_ORIGINALTITLE
template=c:\program files\xlobby\plugins\moviestemplate.xml
filters=$$ITEM_BORROWER(movies)

[Movies_XXX]
input=d:\htpc\ant\catalogue\movies.amc
output=c:\program files\xlobby\databases\movies_xxx.xml
images=d:\htpc\ant\images\
sort=$$ITEM_ORIGINALTITLE
template=c:\program files\xlobby\plugins\moviestemplate.xml
filters=$$ITEM_BORROWER(xxx)


Now, I'd like to add 3rd section, to export WHOLE database into a different database, using different template... but it just doesn't work... It kinda exports images, but xml file is nowhere to be found...

Is .ini limited to number of sections? or what else could cause problems?

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Re: xAnt export to multiple databases

Postby badubo on Mon Apr 07, 2008 2:53 pm

Can you post your .ini ?
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Re: xAnt export to multiple databases

Postby dalanik on Mon Apr 07, 2008 8:25 pm

It looks just like the one posted, I just copied 1st section to 3rd:

    [Movies]
    input=d:\htpc\ant\catalogue\movies.amc
    output=c:\program files\xlobby\databases\movies.xml
    images=d:\htpc\ant\images\
    sort=$$ITEM_ORIGINALTITLE
    template=c:\program files\xlobby\plugins\moviestemplate.xml
    filters=$$ITEM_BORROWER(movies)

    [Movies_XXX]
    input=d:\htpc\ant\catalogue\movies.amc
    output=c:\program files\xlobby\databases\movies_xxx.xml
    images=d:\htpc\ant\images\
    sort=$$ITEM_ORIGINALTITLE
    template=c:\program files\xlobby\plugins\moviestemplate.xml
    filters=$$ITEM_BORROWER(xxx)

    [Movies_web]
    input=d:\htpc\ant\catalogue\movies.amc
    output=d:\htpc\web\movies_web.xml
    images=d:\htpc\web\images\
    sort=$$ITEM_ORIGINALTITLE
    template=c:\program files\xlobby\plugins\moviestemplate_web.xml
    filters=$$ITEM_BORROWER(movies)
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Re: xAnt export to multiple databases

Postby badubo on Tue Apr 08, 2008 8:42 am

template=c:\program files\xlobby\plugins\moviestemplate_web.xml

What is the difference between this template and the old one? (is it the right name?)
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Re: xAnt export to multiple databases

Postby dalanik on Tue Apr 08, 2008 9:40 am

here they are:

template1:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<database>
<sortorder>sorttitle</sortorder>
<sortable>
<sort>title</sort>
<sort>sorttitle</sort>
<sort>genre</sort>
<sort>director</sort>
<sort>year</sort>
<sort>starimage</sort>
<sort>name</sort>
</sortable>
<template></template>
<paths>
<path>D:\HTPC\media\movies</path>
<path>U:\HTPC\media\movies</path>
<path>V:\HTPC\media\movies</path>
<path>W:\HTPC\media\movies</path>
</paths>
<item>
<parameter>$$ITEM_URL</parameter>
<coverart>$$ITEM_PICTUREFILENAME</coverart>
<display>$$ITEM_ORIGINALTITLE</display>
<offline>$$ITEM_SOURCE</offline>
<information>
<name>$$ITEM_ORIGINALTITLE</name>
<title>$$ITEM_ORIGINALTITLE</title>
<sorttitle>$$ITEM_ORIGINALTITLE</sorttitle>
<director>$$ITEM_DIRECTOR</director>
<runtime>$$ITEM_LENGTH</runtime>
<plot>$$ITEM_DESCRIPTION</plot>
<actors>$$ITEM_ACTORS</actors>
<year>$$ITEM_YEAR</year>
<genre>$$ITEM_CATEGORY</genre>
<starimage>skin://buttons/stars/star$$ITEM_RATING.png</starimage>
<off>$$ITEM_SOURCE</off>
<medianr>$$ITEM_MEDIA</medianr>
<videoformat>$$ITEM_VIDEOFORMAT</videoformat>
<videobitrate>$$ITEM_VIDEOBITRATE</videobitrate>
<audioformat>$$ITEM_AUDIOFORMAT</audioformat>
<audiobitrate>$$ITEM_AUDIOBITRATE</audiobitrate>
<resolution>$$ITEM_RESOLUTION</resolution>
<framerate>$$ITEM_FRAMERATE</framerate>
<languages>$$ITEM_LANGUAGES</languages>
<subtitles>$$ITEM_SUBTITLES</subtitles>
</information>
</item>
</database>




template2:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<database>
<item>
<coverart>$$ITEM_PICTUREFILENAME</coverart>
<name>$$ITEM_ORIGINALTITLE</name>
<director>$$ITEM_DIRECTOR</director>
<runtime>$$ITEM_LENGTH</runtime>
<plot>$$ITEM_DESCRIPTION</plot>
<actors>$$ITEM_ACTORS</actors>
<year>$$ITEM_YEAR</year>
<genre>$$ITEM_CATEGORY</genre>
<starimage>$$ITEM_RATING.png</starimage>
<videoformat>$$ITEM_VIDEOFORMAT</videoformat>
<videobitrate>$$ITEM_VIDEOBITRATE</videobitrate>
<audioformat>$$ITEM_AUDIOFORMAT</audioformat>
<audiobitrate>$$ITEM_AUDIOBITRATE</audiobitrate>
<resolution>$$ITEM_RESOLUTION</resolution>
<framerate>$$ITEM_FRAMERATE</framerate>
<languages>$$ITEM_LANGUAGES</languages>
<subtitles>$$ITEM_SUBTITLES</subtitles>
</item>
</database>


dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Re: xAnt export to multiple databases

Postby badubo on Tue Apr 08, 2008 12:56 pm

The second template is not compliant with xlobby databases.

you need to add informations inside a <information> tag, also, the part before <item> in the template 1 is usefull for xlobby

try something like this (you also forgot the Parameter and display tags)
<?xml version="1.0" encoding="UTF-8"?>
<database>
<sortorder>sorttitle</sortorder>
<sortable>
<sort>title</sort>
<sort>sorttitle</sort>
<sort>genre</sort>
<sort>director</sort>
<sort>year</sort>
<sort>starimage</sort>
<sort>name</sort>
</sortable>
<template></template>
<paths>
<path/>
</paths>
<item>
<parameter>$$ITEM_URL</parameter>
<coverart>$$ITEM_PICTUREFILENAME</coverart>
<display>$$ITEM_ORIGINALTITLE</display>
<information>
<name>$$ITEM_ORIGINALTITLE</name>
<director>$$ITEM_DIRECTOR</director>
<runtime>$$ITEM_LENGTH</runtime>
<plot>$$ITEM_DESCRIPTION</plot>
<actors>$$ITEM_ACTORS</actors>
<year>$$ITEM_YEAR</year>
<genre>$$ITEM_CATEGORY</genre>
<starimage>$$ITEM_RATING.png</starimage>
<videoformat>$$ITEM_VIDEOFORMAT</videoformat>
<videobitrate>$$ITEM_VIDEOBITRATE</videobitrate>
<audioformat>$$ITEM_AUDIOFORMAT</audioformat>
<audiobitrate>$$ITEM_AUDIOBITRATE</audiobitrate>
<resolution>$$ITEM_RESOLUTION</resolution>
<framerate>$$ITEM_FRAMERATE</framerate>
<languages>$$ITEM_LANGUAGES</languages>
<subtitles>$$ITEM_SUBTITLES</subtitles>
</information>
</item>
</database>

badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Re: xAnt export to multiple databases

Postby dalanik on Tue Apr 08, 2008 1:37 pm

I know it's not compliant, I don't need it for XLobby :-)
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic