[mythtv-users] Finding gaps in the MythTV recording schedule to do maintenance in

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Apr 19 10:34:48 UTC 2017


I have a busy MythTV box, so when I need a few hours to do some
maintenance on it, such as changing tuner cards or rearranging the
drives, it can be a problem to work out when enough time will be
available.  So I wrote myself a Python script called "gaps" that uses
the new API to get the recording schedule and find when there are gaps
in it.  It takes one command line parameter which is the minimum
number of hours of gap needed.  If there are no parameters given, it
will list all the gaps, no matter how small.  The script is rather
rough and ready, but it works for me.

To use it, you need to also have the Utilties.py Python module
installed.  You can download that from the Wiki Python API Examples
page.  I just put a copy of the file in my /usr/local/bin directory.
Make sure you save the file as a UTF-8 encoded file.

Wiki Python API Examples page:
https://www.mythtv.org/wiki/Python_API_Examples

gaps script:
http://www.jsw.gen.nz/mythtv/gaps

Please let me know if you find any problems with it.


More information about the mythtv-users mailing list