File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1524,8 +1524,21 @@ def activate_hchannel(chan):
15241524 elif event .keyval == Gdk .KEY_Return :
15251525 if channel_focused :
15261526 try :
1527- chan = [c for c in self .hchannels if c .channel .lcn == str (self .chan_lcn_buf )][0 ]
1528- activate_hchannel (chan )
1527+ chan = [c for c in self .hchannels if c .channel .lcn == str (self .chan_lcn_buf )]
1528+
1529+ """
1530+
1531+ If this branch will be merged with "epg", it's very easy to jump across channels using
1532+ their EPG numbers (without needing a lcn tag) just by adding the lines here below:
1533+
1534+
1535+ if (len(chan) == 0 and self.epg is not None):
1536+ epg_channel = [p.attrib["id"] for p in self.epg.findall("channel") if p.attrib["id"].split()[-1] == str(self.chan_lcn_buf)][0]
1537+ chan = [c for c in self.hchannels if chan_match(c.channel.name, epg_channel)]
1538+
1539+ """
1540+
1541+ activate_hchannel (chan [0 ])
15291542 finally :
15301543 self .chan_lcn_buf = 0
15311544 return True
You can’t perform that action at this time.
0 commit comments