[mythtv] [patch] MythGame improvements
b004908 at bsxl.com
Thu Apr 7 14:39:42 UTC 2005
Kristian Kalweit wrote:
> Kristian Kalweit schrieb:
>> Barney Barumba schrieb:
>>> Strange! What do you have set up for your levels? I currently have
>>> "system genre gamename" for all games and just "gamename" for
>>> favourites, although I tried quite a few other combinations as well.
> I found the problem. I made recently a new scan of my mame games
> (after the patch and there were also some changes in cvs). This
> resulting in bad data in the genre field of table gamemetadata.
> Something must be changed in the scan for games code, because the
> genre field was filled with whitespaces after the scan. So the query
> from getFillSQL in gametree.cpp got no results, if genre was in where
> So, yesterday I changed the setGenre method in rominfo.h:
> genre = lgenre.stripWhiteSpace();
> After this I made a new scan and now it works. :-) Maybe it is
> recommed to trim also the other metadata fields.
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
Thanks heaps for checking this out - really appreciated!
The quick fix for this appears to be fix up the game tree code to strip
the search variables, and then use "trim(...)" in the getFillSQL code.
Not very neat, but easy as the changes are all within gametree.cpp.
The proper fix would seem to be fixing up the scan for games code to
strip the whitespace on loading, along with a conversion script to trim
all whitespace currently in the database.
I'll have a look this weekend, and definitely do the quick option, and
hopefully do the full fix as well.
More information about the mythtv-dev