[mythtv] Key mapping for BOOKMARK

Peter Bennett pb.mythtv at gmail.com
Sat Mar 17 16:51:44 UTC 2018

On 03/17/2018 12:59 AM, Michael T. Dean wrote:
> Looks good, but why not do the part that tests to see if they're 
> currently using the SELECT keys for bookmarks as a one-time DB update 
> instead of having to do it every startup?  It would be something like 
> the attached (totally untested) patch.  The main benefit of this 
> approach is that it doesn't clutter up tv_play.cpp with code we'll 
> always wonder how long we need to keep and it takes care of all the 
> hosts in the system at one time and is done forever.  Then, you can 
> just use the new-host default keylists in the REG_KEY lines in 
> tv_play.cpp for SETBOOKMARK and TOGGLEBOOKMARK (which would be the 
> empty string, "").
Hi Mike

I did consider using a database schema upgrade for this. These are my 

I think there are a number of users who run master. They will be forced 
to upgrade all frontends and backends when the code gets installed. This 
may be a penalty of running master, but I think it should be avoided 
when possible.

Doing it in a database upgrade is a lot more code because you have to 
loop through all frontends, also cannot use the global routines that get 
a setting value or the existing routines that get key assignments. More 
testing would be needed. There are 82 lines or more of code against 16 
lines of code in the way I have it.

I think the sample code you provided needs a different control loop - 
there may be frontends that do not have a settings entry for 
AltClearSavedPosition because the user never went into that setting page.

If I do it as it is in my patch I can add a comment in the database 
upgrade stuff saying that when consolidating database version 1348 into 
initialize you can remove a certain 16 lines of code and where to find them.

Anyway, I will do it which ever way you recommend. Do you recommend 
changing it to a schema upgrade?


More information about the mythtv-dev mailing list