[mythtv-users] document which tuner used for recording

Stephen Worthington stephen_agent at jsw.gen.nz
Tue Nov 13 02:33:57 UTC 2018


On Mon, 12 Nov 2018 12:58:23 -0500, you wrote:

>
>> On Nov 12, 2018, at 12:50 PM, James Abernathy <jfabernathy at gmail.com> wrote:
>> 
>> 
>>> On Nov 12, 2018, at 12:32 PM, Stephen Worthington <stephen_agent at jsw.gen.nz> wrote:
>>> 
>>> On Mon, 12 Nov 2018 10:48:22 -0500 (EST), you wrote:
>>> 
>>>>>>> I?m thinking about how to diagnose tuner problems and this info would be helpful.
>>>> 
>>>> You won't see this in MythWeb, but you can see it in the front end by going to the suspect program and pressing Info twice I believe,
>>> 
>>> Yes, it is stored in the "inputname" field in the recorded table.  It
>>> is a relatively recent addition - only available from 0.27? onwards.
>> 
>> Thanks, guys. Found it on the Frontend.  This will help in my tuner debug.
>
>I meant to ask now that I’ve seen the display that I+I gives you.  I see the filename, but not the directory.  I have 2 hard drives mounted and both mount points are in my default storage directory setting.  This ping-pongs the files to spread the recording load. I know I can find it once I have the filename but it would be nice to know which directory to start on.
>
>Any changes on that being added?

No.  That would be counter to MythTV's philosophy of storage groups.
MythTV will find a recording by looking in all the storage groups. You
can move recordings around as much as you like and they will still be
found.

If you want to quickly find a particular recording, you can do what I
do, which is to use the mlocate database.  Install the mlocate package
(I think it is installed by default in Ubuntu).  That will install an
"mlocate" command (aliased to "locate") and an "mlocate" job in
cron.daily that runs the "mlocate.updatedb" command (also aliased to
"updatedb").  So then you can use the file name from the I+I command,
or a database query like this:

MariaDB [mythconverg]> select
chanid,starttime,endtime,title,subtitle,basename from recorded where
title like '%at her m%' order by starttime;
+--------+---------------------+---------------------+--------------------------+------------------+-------------------------+
| chanid | starttime           | endtime             | title                    | subtitle         | basename                |
+--------+---------------------+---------------------+--------------------------+------------------+-------------------------+
|  10017 | 2018-01-07 07:29:00 | 2018-01-07 08:34:00 | At Her Majesty's Service | England          | 10017_20180107072900.ts |
|  10017 | 2018-01-14 07:29:00 | 2018-01-14 08:34:00 | At Her Majesty's Service | Scotland         | 10017_20180114072900.ts |
|  10017 | 2018-01-21 07:29:00 | 2018-01-21 08:34:00 | At Her Majesty's Service | Northern Ireland | 10017_20180121072900.ts |
|  10017 | 2018-01-28 07:29:00 | 2018-01-28 08:34:00 | At Her Majesty's Service | Wales            | 10017_20180128072900.ts |
+--------+---------------------+---------------------+--------------------------+------------------+-------------------------+
4 rows in set (0.05 sec)

and use the basename to find the file:

root at mypvr:~# locate 10017_20180128072900.ts
/home/stephen/.mythtv/cache/remotecache/10017_20180128072900.ts.png
/home/stephen/.mythtv/cache/themecache/MythCenter-wide-JSW.1920.1080/-home-stephen-.mythtv-cache-remotecache-10017_20180128072900.ts.png--480x360.png
/home/stephen/.mythtv/cache/themecache/MythCenter-wide-JSW.1920.1080/-mnt-rec4-recordings-10017_20180128072900.ts.png--480x360.png
/mnt/rec4/recordings/10017_20180128072900.ts
/mnt/rec4/recordings/10017_20180128072900.ts.png

If it is a new recording, done after the daily updatedb run, you can
run updatedb manually, and wait for it to complete, then do the locate
command.

You could also write a script that just looks for the basename in all
your recording directories.  Since you have only two, it would not
need to be a complicated script.  And if you want that script to have
the ability to look up the database, I have a script to do that.  It
looks up your config.xml file to get the correct login to the database
and then runs the "mysql" command.  It needs the "xmlstarlet" package.

http://www.jsw.gen.nz/mythtv/do_mythconverg.sh

You can add that to your script and use the -e option on the mysql
command to run an SQL command and get back the results for your script
to use.  Then you could get the script to lookup the database and find
the recording directories, then look in each one for the basenames it
found from a search query on the recorded table.


More information about the mythtv-users mailing list