Skip to content

Commit

Permalink
Finetune GMEPG left barrier request with the epg history minutes
Browse files Browse the repository at this point in the history
So you can get back left through all the history minutes and when
opening start it at now instead of the beginning of the history. Now
that we can navigate through the left barrier this is a better solution
in case you setup a large history for the GMEPG
  • Loading branch information
Littlesat committed Nov 9, 2024
1 parent a19e93b commit 802a1b2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,9 +764,9 @@ def selEntry(self, dir, visible=True):
return True
else:
new_time = self.time_base - self.time_epoch * 60
now = time()
now = time() - int(config.epg.histminutes.value) * 60
if new_time - now + self.time_epoch < 0:
new_time = now - now % int(config.misc.graph_mepg.roundTo.getValue())
new_time = now - now % int(config.misc.graph_mepg.roundTo.value)
self.fillMultiEPG(None, stime=new_time)
return True
elif dir == +2: #next page
Expand Down Expand Up @@ -984,7 +984,7 @@ def __init__(self, session, services, zapFunc=None, bouquetChangeCB=None, bouque
self.selectBouquet = selectBouquet
self.epg_bouquet = epg_bouquet
self.serviceref = None
now = time() - (int(config.epg.histminutes.value) * 60)
now = time()
self.ask_time = now - now % int(config.misc.graph_mepg.roundTo.getValue())
self["key_red"] = Button("")
self["key_green"] = Button("")
Expand Down Expand Up @@ -1194,7 +1194,7 @@ def enterDateTime(self):
def onDateTimeInputClosed(self, ret):
if len(ret) > 1:
if ret[0]:
now = time() - (int(config.epg.histminutes.value) * 60)
now = time()
self.ask_time = ret[1] if ret[1] >= now else now
self.ask_time = self.ask_time - self.ask_time % int(config.misc.graph_mepg.roundTo.getValue())
l = self["list"]
Expand All @@ -1206,7 +1206,7 @@ def onDateTimeInputClosed(self, ret):

def setNewTime(self, type=''):
if type:
date = time() - (int(config.epg.histminutes.value) * 60)
date = time()
if type == "now_time":
self.time_mode = self.TIME_NOW
self["key_blue"].setText(_("Prime time"))
Expand Down Expand Up @@ -1254,7 +1254,7 @@ def onSetupClose(self, ignore=-1):
l.setEpoch(config.misc.graph_mepg.prev_time_period.value)
l.setOverjump_Empty(config.misc.graph_mepg.overjump.value)
l.setShowServiceMode(config.misc.graph_mepg.servicetitle_mode.value)
now = time() - (int(config.epg.histminutes.value) * 60)
now = time()
self.ask_time = now - now % int(config.misc.graph_mepg.roundTo.getValue())
self["timeline_text"].setDateFormat(config.misc.graph_mepg.servicetitle_mode.value)
l.fillMultiEPG(None, self.ask_time)
Expand Down

0 comments on commit 802a1b2

Please sign in to comment.