Further to my last post, the basic ideas I'm working with for gametree.cpp are:
- create a new GameTreeRoot to store root node settings: levels - e.g. "system year genre gamename" filter - e.g. "favourites = 1" - determine leaf nodes from the root node levels. i.e. do not hardcode "gamename" - use the rightmost value in the root node levels. - maintain a GameTreeItem at each tree node as before, including a generic RomInfo structure holding the common information as per the present implementation. - when selecting leaf nodes, select all fields - this is the main change I made to fix the "no system causes crash" bug - as at the game level all values are selected regardless of whether they were specified in the tree levels. What these all add up to, is the ability to specify a number of root nodes, each with their own paths and criteria. eg, one could have: All Games: levels="system year genre gamename", filter="" Favourites: levels="gamename", filter="favourites = 1" Or, if you had a full mame installation of 3000+ games, but only a handful of other games, you could have: Mame: levels="year genre gamename", filter="system = 'mame'" Other: levels="system gamename", filter="system <> 'mame'" Favourites: levels="gamename", filter="favourites = 1" Initially, I'm thinking of a limited user interface - i.e. only entering "all levels" and "favourite levels" strings from the user interface, and hardcoding the two root nodes and associated filter strings. It would not be hard from there to expose the full configuration to the user, as long as sufficient care was taken when exposing the custom filter strings so as not to allow malicious activity on the database - probably implement it as a select criteria dialogue which creates the custom sql filter rather than allow direct SQL entry by the user. Anyway, those are my thoughts. Again, if anyone is interested I'd be happy to discuss. Apologies for any errors, but I'm just typing this straight out of my head - all my code is at home! Talking of which - better get back to my paid job now :-( Cheers, Barney _______________________________________________ mythtv-dev mailing list mythtv-dev@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev