<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 5 Sept 2021 at 11:10, John <<a href="mailto:jksjdevelop@gmail.com">jksjdevelop@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
  

    
  
  <div>
    <p>I use 65692 which does work but the number may differ for you,
      test the SD channel you pick as source for the EIT of the HD
      channel.</p></div></blockquote><div>How can I tell which one it is? I see no clue from the query below as to which of them is being used for EIT. </div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>select serviceid,chanid,channum,sourceid,callsign,deleted,xmltvid from channel where callsign like("%Channel 4%");</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">+-----------+--------+---------+----------+--------------+---------------------+-----------------+</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">| serviceid | chanid | channum | sourceid | callsign <span class="gmail-Apple-converted-space">    </span>| deleted <span class="gmail-Apple-converted-space">            </span>| xmltvid <span class="gmail-Apple-converted-space">        </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">+-----------+--------+---------+----------+--------------+---------------------+-----------------+</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">|<span class="gmail-Apple-converted-space">      </span>9211 |<span class="gmail-Apple-converted-space">  </span>10211 | 9211<span class="gmail-Apple-converted-space">    </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4<span class="gmail-Apple-converted-space">    </span>| 2021-04-13 22:25:17 | <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">|<span class="gmail-Apple-converted-space">      </span>8311 | <span class="gmail-Apple-converted-space">  </span>9311 | 8311<span class="gmail-Apple-converted-space">    </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4+1<span class="gmail-Apple-converted-space">  </span>| 2021-04-13 22:25:17 | <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">|<span class="gmail-Apple-converted-space">      </span>8316 | <span class="gmail-Apple-converted-space">  </span>9316 | 8316<span class="gmail-Apple-converted-space">    </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4+1<span class="gmail-Apple-converted-space">  </span>| 2021-04-13 22:25:17 | <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">|<span class="gmail-Apple-converted-space">      </span>8320 | <span class="gmail-Apple-converted-space">  </span>9320 | 8320<span class="gmail-Apple-converted-space">    </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4<span class="gmail-Apple-converted-space">    </span>| 2021-04-13 22:25:17 | <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">| <span class="gmail-Apple-converted-space">    </span>21200 |<span class="gmail-Apple-converted-space">  </span>22200 | 21200 <span class="gmail-Apple-converted-space">  </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4 HD | 2021-04-13 22:25:17 | <a href="http://hd.channel4.com">hd.channel4.com</a> |</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">|<span class="gmail-Apple-converted-space">      </span>9211 |<span class="gmail-Apple-converted-space">  </span>19211 | 9211<span class="gmail-Apple-converted-space">    </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4<span class="gmail-Apple-converted-space">    </span>| NULL<span class="gmail-Apple-converted-space">                </span>| <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">|<span class="gmail-Apple-converted-space">      </span>9212 |<span class="gmail-Apple-converted-space">  </span>19212 | 9212<span class="gmail-Apple-converted-space">    </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4<span class="gmail-Apple-converted-space">    </span>| NULL<span class="gmail-Apple-converted-space">                </span>| <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">|<span class="gmail-Apple-converted-space">      </span>9213 |<span class="gmail-Apple-converted-space">  </span>19213 | 9213<span class="gmail-Apple-converted-space">    </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4<span class="gmail-Apple-converted-space">    </span>| NULL<span class="gmail-Apple-converted-space">                </span>| <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">|<span class="gmail-Apple-converted-space">      </span>9214 |<span class="gmail-Apple-converted-space">  </span>19214 | 9214<span class="gmail-Apple-converted-space">    </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4<span class="gmail-Apple-converted-space">    </span>| NULL<span class="gmail-Apple-converted-space">                </span>| <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">|<span class="gmail-Apple-converted-space">      </span>9216 |<span class="gmail-Apple-converted-space">  </span>19216 | 9216<span class="gmail-Apple-converted-space">    </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4<span class="gmail-Apple-converted-space">    </span>| NULL<span class="gmail-Apple-converted-space">                </span>| <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">|<span class="gmail-Apple-converted-space">      </span>8311 |<span class="gmail-Apple-converted-space">  </span>18311 | 8311<span class="gmail-Apple-converted-space">    </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4+1<span class="gmail-Apple-converted-space">  </span>| NULL<span class="gmail-Apple-converted-space">                </span>| <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">|<span class="gmail-Apple-converted-space">      </span>8312 |<span class="gmail-Apple-converted-space">  </span>18312 | 8312<span class="gmail-Apple-converted-space">    </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4+1<span class="gmail-Apple-converted-space">  </span>| NULL<span class="gmail-Apple-converted-space">                </span>| <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">|<span class="gmail-Apple-converted-space">      </span>8314 |<span class="gmail-Apple-converted-space">  </span>18314 | 8314<span class="gmail-Apple-converted-space">    </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4+1<span class="gmail-Apple-converted-space">  </span>| NULL<span class="gmail-Apple-converted-space">                </span>| <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">|<span class="gmail-Apple-converted-space">      </span>8316 |<span class="gmail-Apple-converted-space">  </span>18316 | 8316<span class="gmail-Apple-converted-space">    </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4+1<span class="gmail-Apple-converted-space">  </span>| NULL<span class="gmail-Apple-converted-space">                </span>| <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">|<span class="gmail-Apple-converted-space">      </span>8320 |<span class="gmail-Apple-converted-space">  </span>18320 | 8320<span class="gmail-Apple-converted-space">    </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4<span class="gmail-Apple-converted-space">    </span>| NULL<span class="gmail-Apple-converted-space">                </span>| <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">| <span class="gmail-Apple-converted-space">    </span>21200 |<span class="gmail-Apple-converted-space">  </span>31200 | 21200 <span class="gmail-Apple-converted-space">  </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 4 HD | NULL<span class="gmail-Apple-converted-space">                </span>| <a href="http://hd.channel4.com">hd.channel4.com</a> |</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">| <span class="gmail-Apple-converted-space">    </span>22620 |<span class="gmail-Apple-converted-space">  </span>32620 | 22620 <span class="gmail-Apple-converted-space">  </span>|<span class="gmail-Apple-converted-space">        </span>1 | Channel 44 <span class="gmail-Apple-converted-space">  </span>| NULL<span class="gmail-Apple-converted-space">                </span>| <span class="gmail-Apple-converted-space">                </span>|</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">+-----------+--------+---------+----------+--------------+---------------------+-----------------+</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">17 rows in set (0.01 sec)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:fixedX6x13;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
</div><div>I also tried looking at all the existing column headings in "channel" (with "select * from channel") but none suggested that a channel was being used for EIT. Obviously that info must be in some other table. Would you know which?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div>
    <p>I am testing the following to cope with the clocks changing.</p>
    <p>I know its cringe worthy but might work, the two versions of
      crosseit have the single line change.</p>
    <p> # Winter -- <br>
          # date = dateobj # + datetime.timedelta(seconds=time.altzone)<br>
          # Summer<br>
          date = dateobj + datetime.timedelta(seconds=time.altzone)<br>
    </p>
    <p><font face="monospace"> #!/bin/bash<br>
        if date +%Z | grep -e BST; then<br>
            echo "Summer"<br>
            ./cross-eit3S.py 65692,"<a href="http://hd.channel4.com" target="_blank">hd.channel4.com</a>"<br>
        else<br>
            echo "Winter"<br>
            ./cross-eit3W.py 65692,"<a href="http://hd.channel4.com" target="_blank">hd.channel4.com</a>"<br>
        fi<br>
        /usr/local/bin/mythfilldatabase --refresh-all --verbose xmltv
        --file --sourceid 1 --xmlfile output.xml<br></font></p></div></blockquote><div><br></div><div>You are right that the mix of bash and python is somewhat cringe-worthy: it would be neater to do the change in python rather than calling two versions of the script.</div><div><br></div><div>However a more serious problem is that this approach changes the time zone for all the dates in the EIT for that week. In steady state that's likely to be fine, but in those two transition weeks of the year, when one batch of listings has some listings before the change and some after the change, some of those listings will be assigned the wrong offset.</div><div><br></div><div>The correct but slightly more laborious fix, in my opinion, would be to apply the offset to each individual programme listing in the batch, thus possibly having programmes in the same batch with different UTC offsets, which will happen during those transition weeks. I'll code it up in python when I have a moment, starting from the code that Stephen posted yesterday that got rid of the absurdly long lines.</div></div></div>