[mythtv] MythGame rescan drops favorites

Preston Crow pc-mythtv05a at crowcastle.net
Mon Aug 8 10:22:48 EDT 2005


On Mon, 2005-08-08 at 10:57 -0300, Greg Estabrooks wrote:
> > That's really bad.  If I add a new game, there's no way to get it to
> > show up without wiping all my settings, short of entering it into the
> > database manually.
> 
>  I am considering preserving the favourite setting, either through a seperate
> status table, or just reading the favourites list into memory when a scan is
> done, but will likely never preserve manually edited database info, so manually
> update genre's and such will never survive a new scan.

Yes, but if there's eventually a GUI for letting users set the genre,
year, and such (which there should be), then that information should be
saved.

One way to do this is to add one more column to the database, a boolean
"scan_found."  At the start of the scan, set that to false for all
entries in the table.  Then for each game you find in the file system,
set the scan_found to true--if the update fails, then add a new entry
for the game.  At the end, remove any entries that are still false.

It makes the scan slower, as you probably do about double the number of
database operations per game, but it preserves all the information.

>  That being said I've begun work on adding in more metadata gathering
> so more of that will be auto filled in.  And there will be a different 
> "Unknown" genre for each gametype so that rather than one big Unknown list
> you would have UnknownSNES, UnknownPCE, etc etc

I like that.  That was one of my manual changes!

--PC



More information about the mythtv-dev mailing list