[mythtv-users] Script for detecting copy protected channels on the hdhomerun

James Roberts james at robertshousehold.com
Mon Jan 9 20:14:07 UTC 2012


At first I was going to set it to run after the mythfilldatabase and have
it automatically set any channel with the string "protected" in it to not
be visible, and I might still do that.  The problem is I still need to
remove the channel from both Myth and Schedules Direct to keep the family
from screwing up the front end.  Now, if only the frontend displayed a
message like: This channel is not authorized for viewing when tuned, I'd
just have the script flag in either direction every day, in case Charter
ever give me channels like ABC Family HD back.  Still I'm glad to know my
hacking something together from other people's efforts proved useful.

On Mon, Jan 9, 2012 at 1:15 PM, Matt Emmott <memmott at gmail.com> wrote:

>
>
> On Mon, Jan 9, 2012 at 2:08 PM, James Roberts <james at robertshousehold.com>wrote:
>
>> Over the years I've enjoyed putting around with MythTv, but with the
>> Cable Card tuners, I decided to take the HDHomeRun Prime.  Unfortunately, 2
>> things are current obstacles for me.
>> 1) Arbitrary copy-once choices by my cable company (Charter, you really
>> copy protect NickHD and E! HD, but not ShowTime HD?  Really?) and
>> 2) My frontend doesn't like it when I tune to one of those copy protected
>> channels.  In fact, I have to tie up all 3 tuners to force Myth Frontend
>> onto my old Analog tuner.
>>
>> So, I made a script to help me identify protected channels so I can
>> remove them from both MythTV and Schedules Direct.  I had hoped to just
>> make them not be visible, but needed to delete them to prevent the wife and
>> children from tuning them with the Up/Down buttons.  I modified this from a
>> script I found on the Silicon Dust site, which tuned every channel in a
>> range.  Now It looks at a sourceid (3 in my case) and uses that for the
>> list of channels.  Replace the FFFFFFFF with your ID, especially if you
>> have more than one HDHomeRun.  This could interfere with recordings if the
>> system is in use.  Without further ado, here is my first contribution back
>> to the community:
>>
>> #!/bin/bash
>> # Show subscription and copy protection for HDHR channels
>> # Do a scan into hdhrscan.txt first
>> # With thanks to karog
>> # First output field is the actual virtual channel, the vchan is the
>> guide channel
>> #set -x
>> PROGRAM_NAME="${0}"
>> # Put your tuner id here, from "hdhomerun_config discover"
>> ID="FFFFFFFF"
>> FILE="hdhrscan.txt"
>> MYPW="mythtv"
>> #
>> trychan() {
>>   ENCRYPT=""
>>   #ENCRYPT=`echo $dummy|grep encrypted|sed
>> "s/.*\(encrypted\).*/encrypted/"`
>>   ENCRYPT=`echo $dummy|grep protected|sed
>> "s/.*\(protected\).*/protected/"`
>>   TUNE=`hdhomerun_config $ID set /tuner2/vchannel $CHAN`
>>   sleep 1
>>   if [ "xx" = "x${TUNE}x" ]; then
>>     sleep 2
>>     VSTATUS=`hdhomerun_config $ID get /tuner2/vstatus`
>>     echo $CHAN $VSTATUS $ENCRYPT
>>   fi
>> }
>> #
>> date >&2
>> #
>> mysql -u mythtv -p $MYPW mythconverg -e "select channum ,callsign from
>> channel where sourceid = 3 order by channum" > $FILE
>> echo "Beginning vchannel scan...." >&2
>> while read CHAN CALLSIGN; do
>>   if [ $CHAN != "channum" ]; then
>>     trychan
>>   fi
>> done < $FILE
>>
>>
>> hdhomerun_config $ID set /tuner2/vchannel none
>> date >&2
>> ####################################################### end of script
>> Again, don't forget to set your own sourceid, HDHomeRun ID, and database
>> MYPW password.
>>
>>
>>
> This is awesome - I have to wait till I have a 0KB recording, and then
> mark that channel as invisible in MythWeb every time I come across a new
> copy protected channel. It would be awesome if this was incorporated into
> the next version of MythTV, and if the inverse could run periodically, in
> case some providers turn encryption off at a later date.
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20120109/2b916f2f/attachment.html 


More information about the mythtv-users mailing list