<br><br><div class="gmail_quote">On Mon, Jan 9, 2012 at 2:08 PM, James Roberts <span dir="ltr">&lt;<a href="mailto:james@robertshousehold.com">james@robertshousehold.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Over the years I&#39;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.  <br>1) Arbitrary copy-once choices by my cable company (Charter, you really copy protect NickHD and E! HD, but not ShowTime HD?  Really?) and <br>

2) My frontend doesn&#39;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.<br><br>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:<br>

<br>#!/bin/bash<br># Show subscription and copy protection for HDHR channels<br># Do a scan into hdhrscan.txt first<br># With thanks to karog<br># First output field is the actual virtual channel, the vchan is the guide channel<br>

#set -x<br>PROGRAM_NAME=&quot;${0}&quot;<br># Put your tuner id here, from &quot;hdhomerun_config discover&quot;<br>ID=&quot;FFFFFFFF&quot;<br>FILE=&quot;hdhrscan.txt&quot;<br>MYPW=&quot;mythtv&quot;<br>#<br>trychan() {<br>

  ENCRYPT=&quot;&quot;<br>  #ENCRYPT=`echo $dummy|grep encrypted|sed &quot;s/.*\(encrypted\).*/encrypted/&quot;`<br>  ENCRYPT=`echo $dummy|grep protected|sed &quot;s/.*\(protected\).*/protected/&quot;`<br>  TUNE=`hdhomerun_config $ID set /tuner2/vchannel $CHAN`<br>

  sleep 1<br>  if [ &quot;xx&quot; = &quot;x${TUNE}x&quot; ]; then<br>    sleep 2<br>    VSTATUS=`hdhomerun_config $ID get /tuner2/vstatus`<br>    echo $CHAN $VSTATUS $ENCRYPT<br>  fi<br>}<br>#<br>date &gt;&amp;2<br>#<br>

mysql -u mythtv -p $MYPW mythconverg -e &quot;select channum ,callsign from channel where sourceid = 3 order by channum&quot; &gt; $FILE<br>echo &quot;Beginning vchannel scan....&quot; &gt;&amp;2<br>while read CHAN CALLSIGN; do<br>

  if [ $CHAN != &quot;channum&quot; ]; then<br>    trychan<br>  fi<br>done &lt; $FILE<br><br><br>hdhomerun_config $ID set /tuner2/vchannel none<br>date &gt;&amp;2<br>####################################################### end of script<br>

Again, don&#39;t forget to set your own sourceid, HDHomeRun ID, and database MYPW password.<br>
<br><br></blockquote><div><br>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. </div>
</div>