Skip to content

Commit

Permalink
[epgsearch] jump to search result nearest current time
Browse files Browse the repository at this point in the history
thanks @wedebe
  • Loading branch information
Dima73 authored and WanWizard committed Dec 15, 2024
1 parent f080ccc commit e89222f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions epgsearch/src/EPGSearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,20 @@ def searchEPG(self, searchString=None, searchSave=True):
l.recalcEntrySize()
l.list = ret
l.l.setList(ret)
t = int(time())
histminutes = 0
if hasattr(config.epg, "histminutes"):
histminutes = int(config.epg.histminutes.value) * 60
epg_time = t - histminutes
if t != epg_time:
idx = 0
for x in l.list:
idx += 1
if t < x[2] + x[3]:
break
l.instance.moveSelectionTo(idx - 1)
else:
l.instance.moveSelectionTo(1)

def sortEPGList(self, epglist):
global BouquetChannelListList, IptvBouquetChannelListList
Expand Down

0 comments on commit e89222f

Please sign in to comment.