New Function: change category data held in memory

Got an idea, post it here

New Function: change category data held in memory

Postby gamejester on Thu Sep 30, 2004 2:17 pm

What I want is to be able to change the data in a database without having to refresh the whole database as these looses the current navigation marker within the database.

Let me explain with an example:

I have a database/category called shows.
I then have an overlay filter screen that filters on show name.
This gives a screen with a list of episodes of that show:

4x01 episode 1
4x02 episode 2

When I select a show to watch it I call a background VB script that finds the %file% in the shows.xml and adds a field <status>_</status> to the db, then performs a refresh database.

This adds a _ to a show once you have watched it, so list now looks like:

_4x01 episode 1
4x02 episode 2

..but as the category has to be refreshed to bring in any changes to the xml file it looses its current marker in the category and the filtered list, so reverts back to a first load situation list:

show1
show2
show3
......

This was a first draft proof of concept before Steven adds support for 2 graphics per record, I could then use one as a thumb image and create more of a Tivo look with green balls for new, red balls for watched, etc....

In order to achieve this I need to be able to alter a Db in memory, then commit the changes to the xml. FYI, this is the behaviour if you hit F2 and change some database elements, so the functionality is there, just needs exposing as an event.
gamejester
 
Posts: 131
Joined: Mon Jun 21, 2004 9:20 am

Postby antipasto on Thu Sep 30, 2004 3:06 pm

that's a pretty sweet little hack... nice idea!
antipasto
 
Posts: 44
Joined: Fri May 07, 2004 10:35 pm

Postby gamejester on Thu Oct 14, 2004 2:10 pm

Bump, as it is related to the post by Dalanik, saves explaining it all twice!
gamejester
 
Posts: 131
Joined: Mon Jun 21, 2004 9:20 am

Postby dalanik on Thu Oct 14, 2004 2:51 pm

Aha, well, i thought i saw the request somewhere :-)

What I'm trying to do is get a list of subtitles on the CD with external program and then pass it to XLobby via database :-)

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

Postby antipasto on Thu Oct 14, 2004 4:04 pm

Stephen added a database reload on change, but I think since has added it to the refresh command. Basically, make external changes to the database while running Xlobby, hit refresh, and the database will update! Lots of possibilities, especially with plugins.

But yeah, it resets where you are. This could be complex because what if the current selection is removed? The delete functions seem to handle that complexity nicely, however.
antipasto
 
Posts: 44
Joined: Fri May 07, 2004 10:35 pm

Postby dalanik on Fri Oct 15, 2004 7:45 am

Hm, I'll be damned - it works... I guess i made a mistake by REFRESHING first and then displaying the overlay. If I display it first and the refresh it works OK.
D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby gamejester on Fri Oct 15, 2004 9:48 am

antipasto, are you talking about OS DELETE, where you specify a category?

Never used that (although plan to soon) how does that work?
Does it delete the file specified in the current screens highlighted category item?
Then where does the focus go?
Does it prompt for 'are you sure'?
What happens if you do not specify a category (it says optional)?
gamejester
 
Posts: 131
Joined: Mon Jun 21, 2004 9:20 am