Page 1 of 1

Is Xant source available?

PostPosted: Wed Apr 25, 2007 12:21 am
by WannaTheater
HI, I am looking to see if I can do this with the XAnt plugin, or get the plugin source to modify:

I have a single Ant movie database (called 'Movies.amc'). This database contains a field ('Borrower'), that I set to either "Mature" or "Family," based on the type of movie. Since the XAnt plugin associates 1 Xlobby (.xml) database to 1 Ant (.amc) database, I am constantly having to manually split my Movies.amc database into 2 separate .amc databases. Each of these .amc databases (Movies_Family.amc and Movies_Mature.amc) are then used to generate the XLobby (.xml) databases (using the XAnt.ini file).

What I would like to do is have the XAnt plugin generate the two Xlobby databases (movies_mature.xml and movies_family.xml) from the single Movies.amc database, based on if the "Borrower" field is set to 'Mature' or 'Family.'


Any suggestions?

Thanks!

PostPosted: Wed Apr 25, 2007 6:42 am
by badubo
What I would like to do is have the XAnt plugin generate the two Xlobby databases (movies_mature.xml and movies_family.xml) from the single Movies.amc database, based on if the "Borrower" field is set to 'Mature' or 'Family.'


you can do that, you can add filters :

in your .ini :
- duplicate the section corresponding to the movies database.
- rename the second section (or both) in orther to not have duplicate section names
- change the "output" keys of both section to create two different .xml (movies_mature.xml and movies_family.xml)
- for each section, you will have to add a "filters" key (or adapt if it already exists)
-->
in Mature section :
filters=$$ITEM_BORROWER(Mature)
in family section :
filters=$$ITEM_BORROWER(Family)

before starting Xlobby, don't forget to delete the old movies.xml

PostPosted: Wed Apr 25, 2007 10:11 am
by WannaTheater
Thank You! Worked like a charm!
This is exactly the feature I was looking for. Great plugin!

:D

-Greg

PostPosted: Wed Apr 25, 2007 1:25 pm
by dalanik
Cool!!! I've been thinking about implementing something like this for some time, but was unable to figure it out, this is sooooo cool!

This way, I can continue to keep all my media in 1 ant catalogue file and have it separated into 2 or more databases in Xlobby!

Thanx a bunch!!!!

D.

PostPosted: Wed Apr 25, 2007 2:41 pm
by Marbles_00
That is great. I never really gave it much thought until I saw WannaTheater's post. 8) Feature.

Thanks for it.

Another HUGE reason for using XANT over others.

PostPosted: Wed Apr 25, 2007 2:47 pm
by badubo
In fact this feature is there from the beginning (in the french doc, sorry for this)

Just in case you need to make more complex filters

You can make the same with all AMC variables :
$$ITEM_AMCVAR(value1,value2,...) -->represents all items where ITEM_AMCVAR has the value : value1 or value2, ...

!$$ITEM_AMCVAR(value1,value2,...) -->represents all items where ITEM_AMCVAR has NOT the values : value1, value2,...

you can have several filters by separate them by a |

example :
filters=
$$ITEM_CATEGORY(comedy)|$$ITEM_MEDIA(DVD,CD-ROM)| !$$ITEM_VIDEOFORMAT(DVD)
will create a database containing all items that are
- a comedy (as category)
- stored either on a CD or on a DVD (so, offline)
- but that are not DVDVideo format (i.e. Divx and XVid)

PostPosted: Wed Apr 25, 2007 6:46 pm
by dalanik
Ah, man this is so great! I wanted to ask if there is a way to do NOT :-) but thought I won't push my luck... :-)

Re: Is Xant source available?

PostPosted: Mon Sep 24, 2007 4:25 pm
by WannaTheater
Still looking for source if available... I need to make a MINOR change, so that Xant converts "|" to "newlines" when reading from Ant movie database.

Re: Is Xant source available?

PostPosted: Fri Apr 10, 2009 9:44 am
by WannaTheater
Source code anyone? I'm at the point where I need functinality to set specific tags based on indivual fields in the ANT database...
like

If ANTfield1 = TRUE then
<xlobbyDBtag>Tag1</xlobbyDBtag>
else
<xlobbyDBtag>Tag2</xlobbyDBtag>
endif

... I also still need to replace ANT "|" charagters with "newline"

I currently am doing this after databases are loaded (post processing), but it would make much more sense to do while they are loaded