<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 10, 2022 at 6:33 AM James Abernathy <<a href="mailto:jfabernathy@gmail.com">jfabernathy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 9, 2022 at 9:21 PM Stephen Worthington <<a href="mailto:stephen_agent@jsw.gen.nz" target="_blank">stephen_agent@jsw.gen.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sun, 9 Oct 2022 11:27:53 -0400, you wrote:<br>
<br>
>Thanks, this is very useful.  I got what I needed out of a simple:<br>
>select chanid,channum from channel; but yours is more useful.<br>
><br>
>I tried to update my power search record rule to use channum but that<br>
>failed.  So I guess I'll have to run the mysql query and find the chanid<br>
>from the printout and just plug that into the Power Search.  I don't<br>
>understand it, but it works.<br>
><br>
>Jim A<br>
<br>
It should be possible to use channum in a power search rule.  I would<br>
suggest something like this:<br>
<br>
program.title='College Football' and program.chanid not in (select<br>
chanid from channel where channel.channum='1');<br>
<br>
Change the channum '1' to the channel you want.  Note that the channum<br>
field is actually a char field, so you need to provide a character<br>
string not a number when using it.  Or use 'channum+0' to convert it<br>
to an integer to use it in a numeric context.<br>
<br>
Doing a more complex (and multi-table) query like that will slow down<br>
the scheduler a little bit though.<br>
<br>
As I understand it, power search SQL is done in the context of the<br>
program table, and any reference to other tables has to use the name<br>
of the table (like channel.channum, not just channum).  So I tested<br>
the above SQL like this:<br>
<br>
MariaDB [mythconverg]> select * from program where<br>
program.title='College Football' and program.chanid not in (select<br>
chanid from channel where channel.channum='1');<br>
Empty set (0.001 sec)<br><br></blockquote><div><br></div><div>I seem to have a handle on this with the exception of the chanid's I have right now.  On a test system built with Master and only HDHR network tuners, I have the chanid equal to 1 + atcs major + '0' + atcs minor.  i.e. 22_2 becomes 12202.</div><div><br></div><div>But on my production backend where I want these power searches, I have HDHR and Hauppauge WinTV-qualHD tuners.</div><div><br></div><div>There I seem to have all the normal chanid  plus the weird ones that make no sense to me. For example channel, 22_2, is in the query output twice:</div><div>chanid 12202 and 16223.</div><div><br></div><div>So it sounds like I need a more complicated powersearch that uses channum to index the channel table so the result excludes any recording for either of the chanid's for channum 22_2.</div><div><br></div><div>Jim A.</div></div></div></blockquote><div><br></div><div>Thanks for the help.  I ended up with this Power Search;</div><div><br></div>program.title='College Football' and program.chanid not in (select chanid from channel where channel.channum='28_1' or channel.channum='22_2')<br><div><br></div><div>This gave me all the College Football games recorded except those on channels 28_1 and 22_2 which are a lot of rebroadcasts of second tier teams.</div><div><br></div><div>Jim A</div><div> </div></div></div>