DB Editor Plugin

Xlobby plugin development

DB Editor Plugin

Postby chadwolcott on Mon Nov 01, 2004 5:42 pm

So I started to look at creating a plugin that would allow you to edit the xlobby DBs directly from a button. I quickly realized that I am a little over my head and fortunately/unfortunately have just recently started a new job so I dont have the time I'd like to look at it. I thought maybe someone with more knowledge than I might like to look at it.

I want a function that will take a movie name as a parameter like category>movie>name and will allow you to create a db field (if it doesn't exist) and pass a value to that field. I have a number of movies defined with personal ratings (1-4 stars). I want to be able to assign ratings based on a button/group of buttons in XL. In order to do this, I think you would need to parse the moviesdb and find the correct root element, then check for the existence of the child node "stars". If there, assign valus based on the button pressed which would justchange an agument 1-4. This would then map to a particular PNG for that number.

I can add the fields via the db editor easily, but it is really time consuming to go through the xml file and change the ratings there...It would be much nicer if you could do it through the UI.
chadwolcott
 
Posts: 107
Joined: Fri Sep 05, 2003 2:34 pm
Location: Boston, MA

Postby QTips on Mon Nov 01, 2004 6:08 pm

That would be awesome :mrgreen:
QTips
 
Posts: 158
Joined: Tue Dec 16, 2003 6:53 pm
Location: Norway

Postby Colby on Mon Nov 01, 2004 7:09 pm

...It would be much nicer if you could do it through the UI.
]

I have always wanted this too. I would like to use button>input or something to insert the information into the "set info here" for db tags, and then save. The graphics thing would work itself out if the input was set to the path of the image. Kinda like the spiders do.
Colby
 
Posts: 929
Joined: Mon Feb 02, 2004 7:42 am
Location: Brookline Station, MO, USA

? ....

Postby kolemieux on Tue Nov 02, 2004 4:33 am

Guys, I've been digging for something like this as well - not just from a TV View - but perhaps via an HTML interface while not on my Xlobby Machine.

Am I missing something guys, can this be done. I'd like to edit my MOVIES and MUSIC DB files from a remote machine and know this could be done with an app that simply manipulates the XML file (not something I could handle) ...

But can this be done guys? Am I missing somethin. I dont use Profiler or anything other than Xlobby and Spiders (WHICH I LOVE) to edit.

Steven? Colby? Am I missing anything guys?
kolemieux
 
Posts: 155
Joined: Tue Jun 10, 2003 8:28 pm

Postby Colby on Fri Dec 03, 2004 2:30 am

Well guys we got what we wanted. Steven created an new events called category>variable set and category>variable unset

Variable set event can have 3 inputs
the category (this tells what db to associate the new field)
the variable (this will create the new variable, sort tag, or filter)
the value (this will create the value)

why is this all so cool?
you can create a button within the skin that says say rate 4 stars
then with the variable set you can assign a predeterminded graphic to a database entry. especially if you use skin://whateverfolder/4stars.png as the value.

then instantly your database will be rated and could be sorted by these.

I assume one could make a series of events that would create a graphic for a show depicting if it was viewed or not upon end of play.

this is very powerful

the variable unset removes a field if you make it by mistake or apply it to the wrong item

have fun skinning!
Colby
 
Posts: 929
Joined: Mon Feb 02, 2004 7:42 am
Location: Brookline Station, MO, USA

Postby jowaldo on Fri Dec 03, 2004 7:00 am

cool, another fun feature to play with ;)
jowaldo
 
Posts: 903
Joined: Wed May 21, 2003 7:17 pm

Samples?

Postby kolemieux on Sat Dec 04, 2004 3:12 pm

when you guys get a chance - as I am challenged without example, could you let us know when u have a test screen or so to see how this works.

I am specifically interested in MovieDB editing i.e. Genre, Title, the like.... a Genre select list of predefineds would be very nice.

Thx guys
kolemieux
 
Posts: 155
Joined: Tue Jun 10, 2003 8:28 pm

Postby Colby on Sat Dec 04, 2004 4:21 pm

I already set up 5stars rating in my skin yesterday. It uses these new tools.

For what you are trying to do is simple enough. you need to create a button called edit genre of the movie details page, this would take you to a screen or overlay. On that screen you would have buttons for all the genres you would want to use. each type of genre in this list would have the event category>variable set.
category = movies
variable= genre
value= horror (the name of the genre button)

when you click this horror button it will create and/or apply the genre horror to the selected movie item

Its all pretty easy really.

Making titles wouldnt be so simple because you cant predetermine the title. Hopefully we can soon have variable values.
Colby
 
Posts: 929
Joined: Mon Feb 02, 2004 7:42 am
Location: Brookline Station, MO, USA

Postby kolemieux on Sat Dec 04, 2004 4:27 pm

THANKS COLBY......

Gonna work with it right now - thanks again.
kolemieux
 
Posts: 155
Joined: Tue Jun 10, 2003 8:28 pm

Postby gamejester on Sun Dec 05, 2004 9:58 pm

I assume one could make a series of events that would create a graphic for a show depicting if it was viewed or not upon end of play.


I certainly have, that is why I made the original request, works like a charm with the offline/online overlays.

Variable set event can have 3 inputs
the category (this tells what db to associate the new field)
the variable (this will create the new variable, sort tag, or filter)
the value (this will create the value)


Sort tag in variable?
I want to be able to set the sort order for a category from an event, mainly for filtered views; is this possible by category:set? I have not been successful so assumed it was not implemented.

Were this would be of the most use is for filtered category views, ie:

for my series shows db, I filter the imported database on
showDate:name:showEP:showTitle

this view then gives me all the newest shows at the top
however, if I filter on show, the now filtered list containing only 1 show with all its episodes and would look better filtered by just:

showEP:showTitle
gamejester
 
Posts: 131
Joined: Mon Jun 21, 2004 9:20 am

Postby Arthur on Fri Dec 17, 2004 9:34 am

Would it be possible to sort 3 stars or more? resulting in all items with 3, 4 or 5 stars?
Arthur
 
Posts: 207
Joined: Thu Dec 25, 2003 8:52 am
Location: The Hague, The Netherlands