Is Xant source available?

Xlobby plugin development

Is Xant source available?

Postby WannaTheater on Wed Apr 25, 2007 12:21 am

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!
WannaTheater
 
Posts: 235
Joined: Thu Aug 24, 2006 11:35 am
Location: Florida

Postby badubo on Wed Apr 25, 2007 6:42 am

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
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Postby WannaTheater on Wed Apr 25, 2007 10:11 am

Thank You! Worked like a charm!
This is exactly the feature I was looking for. Great plugin!

:D

-Greg
WannaTheater
 
Posts: 235
Joined: Thu Aug 24, 2006 11:35 am
Location: Florida

Postby dalanik on Wed Apr 25, 2007 1:25 pm

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.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby Marbles_00 on Wed Apr 25, 2007 2:41 pm

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.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Postby badubo on Wed Apr 25, 2007 2:47 pm

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)
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Postby dalanik on Wed Apr 25, 2007 6:46 pm

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... :-)
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Re: Is Xant source available?

Postby WannaTheater on Mon Sep 24, 2007 4:25 pm

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.
WannaTheater
 
Posts: 235
Joined: Thu Aug 24, 2006 11:35 am
Location: Florida

Re: Is Xant source available?

Postby WannaTheater on Fri Apr 10, 2009 9:44 am

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
WannaTheater
 
Posts: 235
Joined: Thu Aug 24, 2006 11:35 am
Location: Florida