[mythtv-users] Copy frontend settings to new frontend keeping both
Michael T. Dean
mtdean at thirdcontact.com
Mon Oct 26 20:50:42 UTC 2015
On 10/26/2015 02:42 PM, Mike Rice wrote:
> On Mon, Oct 26, 2015 at 4:56 AM, Michael T. Dean wrote:
>> There's no way to do this. Why? Because a) there's no definition of
>> "frontend settings," and b) in theory, you should be using almost all
>> default settings and only modifying a few settings values to get the
>> behavior you desire, so it should be easy to change a few settings after
>> creating a new frontend--and failing to do so will have no negative effects
>> other than not performing the behavior you expect (which then becomes your
>> notification that you need to change that setting to something other than
>> the default).
>
> As far as b) goes I agree that it should be just changing a few settings.
> The problem is there are many settings and it isn't clear which settings
> have been changed from the default. And then when the misbehavior occurs
> it's sometimes hard to find the page in the setup to change it.
>
> Is there any way to determine which settings have been changed from the
> default?
No, but that's what I'm alluding to when I say we plan to eventually
have functionality for making this easier. Likely tools to allow a)
resetting all settings to defaults, b) identifying what settings differ
from defaults (including via highlights within the settings editors),
and even c) a tool to "export" those modified settings and "import" them
into other systems.
> I'd rather not insert into the database as suggested but maybe I can just
> run a query to show the differences between the old frontend settings and
> new frontend settings. Then I could make the actual changes in the normal
> manner.
The hardest part is getting a list of default values for settings. You
could do this by starting up mythfrontend with a LocalHostName override,
setting it to something like default_settings, then immediately shut
down mythfrontend and remove the LocalHostName override (or put it back
to what it was). That would give you a "new host" called
default_settings with a list of most of the settings and all of their
defaults (don't worry about having a host you don't use in the
database--the data will take < 8kB (possibly < 4kB) of space on disk
(most all because of the file system's block size) and won't ever be
loaded into any host's memory by MythTV (however, it may exist in the
MySQL server's memory) and won't affect performance on any system).
Note, though, that not all settings are written to the database--in some
cases, you have to go into some pages (or "hidden" subsections that only
appear when you toggle some related settings) for values for those
settings to be written to the database. That said, most of the settings
that aren't written after a simple start up/shut down of mythfrontend
are ones that are almost never actually changed from defaults.
Once you've done that, you could compare the settings using anything
from the mythfrontend settings editor, as previously mentioned, or the
MythWeb settings editor (which just shows a list of all the settings
values and data), or the backend web server's settings editor (which can
provide an XML--or, I think, JSON) view of the settings values and
data--where all but mythfrontend allow you to actually specify which
host's settings to view. Oh, or you could use MySQL. However, I
strongly recommend that after you identify the changed settings, you use
the frontend settings editor to actually change the data, since some of
them may not be appropriate/applicable/(or even)available on some hosts
and the frontend settings editor will show you only valid options as
well as explain them.
Mike
More information about the mythtv-users
mailing list