<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 29 August 2016 at 11:09, Gary Buhrmaster <span dir="ltr"><<a href="mailto:gary.buhrmaster@gmail.com" target="_blank">gary.buhrmaster@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Before I spend the time authoring a wiki article for make<br>
things "official", I am going to ask if the following utilities<br>
seem to have any value for anyone other than myself.<br>
<br>
The initial work was just to gain familiarity with the<br>
Services API (and the idiosyncrasies). However I have<br>
graduated to using them for my own purposes.<br>
<br>
Source of MythUtil utilities:<br>
<a href="https://github.com/garybuhrmaster/MythUtil" rel="noreferrer" target="_blank">https://github.com/<wbr>garybuhrmaster/MythUtil</a><br>
<br>
A few warnings:<br>
* Some of the utilities can optionally update<br>
the MythTV database via the services API.<br>
Always insure you have a current backup<br>
before allowing updates to be performed<br>
* These utilities are only tested on 0.28<br>
* The utilities that work with the HDHomeRun<br>
devices only support the recent generation<br>
devices (4th gen, or 3rd gen HDHR3-CC<br>
(aka Prime)) with recent firmware. You may<br>
want/need to use "Detect Channels" to get<br>
the current channel list for your HDHR for<br>
accurate information.<br>
* Before running any of the utilities, it is<br>
recommended to run it with the --help option<br>
to examine the command line options<br>
<br>
For the following examples, it is presumed that<br>
one is running on the MBE (which eliminates the<br>
need to specify the --backend), and that the [interesting]<br>
videosource-id is 1, and the HDHomeRun has the<br>
name myhdhr.local (and for the last, the xmltv config<br>
file is named CABLE for the xmltv config file). btw,<br>
tv_grab_zz_sdjson_sqlite is not yet in an official<br>
XMLTV release, but can be obtain via their cvs repo,<br>
or the original master can be found at:<br>
<a href="https://github.com/garybuhrmaster/tv_grab_zz_sdjson_sqlite" rel="noreferrer" target="_blank">https://github.com/<wbr>garybuhrmaster/tv_grab_zz_<wbr>sdjson_sqlite</a><br>
<br>
<br>
The utilities (and a sample scenario).<br>
<br>
MythUtil-Channel-videosource<br>
- will display the existing videosources (one should<br>
normally use mythtv-setup, but this was an initial<br>
test/experiment)<br>
<br>
MythUtil-Channel-HDHR-<wbr>channelCheck --hdhr myhdhr.local --videosource-id 1<br>
- compares the HDHR and MythTV channel list<br>
This can indicate that the MythTV lineup channels do not<br>
match what the HDHR thinks are the appropriate channels<br>
that it can tune. You may want to add/delete/update the<br>
MythTV channel list (or not).<br>
<br>
MythUtil-Channel-HDHR-<wbr>visibilityCheck --hdhr myhdhr.local --videosource-id 1<br>
- compares the differences between the MythTV and HDHR visibility.<br>
Visibility (for CableCARD devices) will depend on your<br>
subscription tier. So your channel lineup may have 500+ channels,<br>
but your subscription tier may only has 150 channels. This utility<br>
can automate (and maintain) the MythTV channel visibility to match<br>
your tier (if you are using a HDHR).<br>
<br>
MythUtil-Channel-HDHR-<wbr>visibilityCheck --hdhr myhdhr.local<br>
--videosource-id 1 --update --channel 123 234<br>
- Will update channel 123 and 234 visibility to be what the HDHR indicates<br>
<br>
tv_grab_zz_sdjson_sqlite --get-lineup --quiet --config-file<br>
~/.mythtv/CABLE.xmltv | MythUtil-Channel-XMLTV-<wbr>getLineup<br>
--videosource-id 1<br>
- Will take the output of the XMLTV schedules direct grabber<br>
and compare with the MythTV database. This is (sort of) a<br>
prototype for some (maybe) future MythTV setup using the<br>
--get-lineup capabilities for some grabbers (no scan for channels<br>
would be required for xmltv sources that have the needed info<br>
from the provider).<br>
<br>
There are numerous other options to check/compare/update depending<br>
on the utility (check the --help).<br>
<br>
I would be interested to know if any of these utilities seem to be<br>
useful to anyone else (other than me). If you find real bugs, please<br>
open an issue on github (for tracking purposes).<br>
<br>
I tend to (semi-regularly) use the last example to update my MythTV<br>
channel list from my schedules direct lineup, and the next to last<br>
example (without a channel selection) to update the visibility based<br>
on my HDHR channel list (running both in reporting mode first, to<br>
see what they are going to do before letting them go and do it).<br>
<br>
At some point I will try to write up a couple of issues/limitations I<br>
encountered with using the services API and send them to the<br>
devs for consideration (and try to create patches if I can figure<br>
how to address the issue(s)).<br>
<br>
Thanks for any feedback.<br>
<br>
Gary<br></blockquote><div><br></div><div>Might be worth renaming due to confusion with the official mythutil <a href="https://www.mythtv.org/wiki/Mythutil">https://www.mythtv.org/wiki/Mythutil</a></div><div><br></div><div>Cheers,</div><div><br></div><div>Anthony </div></div></div></div>