Patch (basic idea VTI image).
One problem, setting GME...
--- a/EpgList.py +++ b/EpgList.py @@ -8,6 +8,7 @@ from Tools.LoadPixmap import LoadPixmap from time import localtime, time +from Components.config import config from ServiceReference import ServiceReference from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN @@ -257,11 +258,18 @@ self.selectionChanged() def fillSingleEPG(self, service): - #t = time() - test = [ 'RIBDT', (service.ref.toString(), 0, -1, -1) ] + t = time() + epg_time = t - config.epg.histminutes.getValue()*60 + test = [ 'RIBDT', (service.ref.toString(), 0, epg_time, -1) ] self.list = self.queryEPG(test) self.l.setList(self.list) - #print time() - t + if t != epg_time: + idx = 0 + for x in self.list: + idx += 1 + if t < x[2]+x[3]: + break + self.instance.moveSelectionTo(idx-1) self.selectionChanged() def sortSingleEPG(self, type): --- a/UsageConfig.py +++ b/UsageConfig.py @@ -203,7 +203,7 @@ config.epg.viasat.addNotifier(EpgSettingsChanged) config.epg.netmed.addNotifier(EpgSettingsChanged) - config.epg.histminutes = ConfigSelectionNumber(min = 0, max = 120, stepwidth = 15, default = 0, wraparound = True) + config.epg.histminutes = ConfigSelectionNumber(min = 0, max = 720, stepwidth = 30, default = 0, wraparound = True) def EpgHistorySecondsChanged(configElement): from enigma import eEPGCache eEPGCache.getInstance().setEpgHistorySeconds(config.epg.histminutes.getValue()*60)
Edited by Dima73, 2 March 2013 - 14:17.