[mythtv-users] UPDATED: Bash/MySQL script for copying and/or deleting mythfrontend profiles

Jeffrey J. Kosowsky mythtv at kosowsky.org
Wed Jan 13 23:56:05 UTC 2010


Michael T. Dean wrote at about 18:34:15 -0500 on Wednesday, January 13, 2010:
 > On 01/13/2010 06:16 PM, Jeffrey J. Kosowsky wrote:
 > > Jeffrey J. Kosowsky wrote at about 01:39:53 -0500 on Wednesday, January 13, 201
 > >  > Here is an updated version adding your #1:
 > >  > --------------------------------------------------------------------
 > >  > 
 > >  > # !/bin/bash
 > >  > #mythfrontendprofiledup
 > >  > # Version 0.2, January 2010
 > >  > #Jeff Kosowsky (with MUCH help from Ronald Frazier)
 > >  > #Script to automatically copy and/or delete mythfrontend profiles.
 > >  > #
 > >  > # Note the program operates on the following tables:
 > >  > # settings, keybindings, jumppoints, displayprofiles, displayprofilegroups
 > >  >
 > >  > # ############################################################################
 > >
 > > Just to add some fuel to the fire...
 > >
 > > I just realized another *good* use for this program.
 > >
 > > Suppose you want to play with some frontend settings but don't want to
 > > have to remember them all and undo them later. Also, you are only
 > > playing with one of the frontends so you don't want to backup and
 > > restore the entire database which could interfere with other database
 > > changes (either from the scheduler or from other frontends).
 > >
 > > Well you can use my program to *temporarily* save the frontend settings to a
 > > dummy hostname and then restore later.
 > >
 > > For example:
 > > 	- Save settings to dummy profile "tempfrontend"
 > > 			mythfrontendprofiledup myfrontend tempfrontend
 > > 	- Play around with settings or make temporary changes
 > > 	- Restore old frontend settings
 > > 		  	mythfrontendprofiledup  tempfrontend myfrontend
 > > 	- Delete saved copy
 > > 		  	mythfrontendprofiledup  -d tempfrontend
 > >
 > > Now internally, the restore won't be perfect since the profilegroupids
 > > and profileid's will be increased but that shouldn't affect the user.
 > 
 > All of that's fine.  I have no problems with the functionality.
 > 
 > My /ONLY/ complaint is that it's a bash hack that's a 3rd-party (not 
 > part of MythTV, therefore, not maintained when MythTV is changed) script.

True -- I started this as a simple question and hack with hopefully a
simple answer and it has mushroomed...

 > As I mentioned at the start of the script, I would prefer to see you 
 > spend all of this time you're--pardon the bluntness, but--wasting on 
 > this script on the /actual/ solution that will go into MythTV: 
 > 
 > http://svn.mythtv.org/trac/ticket/6064

OK - but I only saw this mentioned in post 19 of the thread, 3 days
after I posed the question and long after I had already started down
the other path.

Also 'wasted' is not only blunt (which is ok) but a matter of
perspective -- personally, I have *learned* a lot both about mythtv
and about sql so I don't regret the time spent even if the patch were
released into 'fixes' tomorrow. And long term such knowledge will make
me not only a better user but a better contributor...

Also, to be blunt in return, it is unclear to me when the patch will
be introduced into 'fixes' and it seems that while introduced 13
months ago, noting has been added in 3 months now and it is not 
obvious when (if ever? lol) it will make it to stable release. So in
the meantime, my script may be useful to some which is why I have
posted it to the list.

Finally, if you want my help, please let me know what needs to be
done. Though my ability to help test may be limited since I don't
have a setup to compile my own binaries (I use atrpms fixes branch
primarily).

 > and, when it goes in, it will completely obsolete this script.

That's great and of course a better long term approach for everybody!


More information about the mythtv-users mailing list