[mythtv-users] document which tuner used for recording

Jim Abernathy jfabernathy at gmail.com
Wed Nov 14 16:01:51 UTC 2018


On 11/14/18 9:50 AM, Bill Meek wrote:
> On 11/13/18 5:49 AM, Jim Abernathy wrote:
>
> ...
>
>> This is very useful. locate is already install on my Ubuntu 18.04 
>> system and the mlocate daily job already exist. Since I've pushed out 
>> the running on anacron daily jobs to 5:30 am, then all my recordings 
>> can be found this way the next morning. Thanks,
>
> Python bindings work too, like this:
>
> #!/usr/bin/env python
> # -*- coding: utf-8 -*-
>
> '''
> print_inputs.py: Print the inputs used for recordings
>
> Example: print_inputs.py [title (regular expressions work)]
> '''
>
> from __future__ import print_function
> import re
> import sys
> from MythTV import exceptions, MythBE
>
> try:
>     TITLE = sys.argv[1]
> except IndexError:
>     TITLE = None
>
> try:
>     BACKEND = MythBE()
> except exceptions.MythError:
>     sys.exit('\nUnable to connect to the backend, aborting.\n')
>
> # pylint: disable=no-value-for-parameter
> RECORDINGS = BACKEND.getRecordings()
>
> for RECORDING in RECORDINGS:
>     if TITLE and re.search(TITLE, RECORDING.title, re.IGNORECASE) is 
> None:
>         continue
>
>     print(u'{:6}  {}  {:12.12}  {}'.format(RECORDING.chanid,
>                                            RECORDING.starttime,
>                                            RECORDING.inputname,
>                                            RECORDING.title))

This a nice script. I need to get smart and modify it some.

Thanks, Jim A




More information about the mythtv-users mailing list