It's out by exactly 1 week.amazing isn't it?
but the current/next epg for some reason still had the old program.
event_begin, event_end, duration, event_name = getServiceInfo(self,0)
if event_begin != 0:
now = int(time())
event_run = now - event_begin
if ConfigType == "2":
remaining = "%+d min" % int((event_end - now)/60)
It's in plugin.py too.have you also found the code for getServiceInfo?
sref = self.session.nav.getCurrentlyPlayingServiceReference()
if sref is not None:
event = self.epgcache.lookupEvent(['IBDCTSERNX', (sref.toString(), NowNext, -1)])
event_begin = 0
if event:
if event[0][4]:
t = event[0][1]
duration = event[0][2]
event_name = event[0][4]
event_begin = t
event_end = event_begin + duration
else:
service = self.session.nav.getCurrentService()
info = service and service.info()
event = info and info.getEvent(NowNext)
if event:
event_name = event.getEventName()
event_begin = event.getBeginTime()
duration = event.getDuration()
event_end = event_begin + duration
That might be skin-based. For the skin I use this is:the info bar code might also be helpful because on the info bar the remaining duration is shown correctly.
<widget source="session.Event_Now" render="Progress" position=......
<convert type="EventTime">Progress</convert>
</widget>
sref = self.session.nav.getCurrentlyPlayingServiceReference()
if sref is not None:
event = self.epgcache.lookupEvent(['IBDCTSERNX', (sref.toString(), NowNext, -1)])
event_begin = 0
if event:
if event[0][4]:
t = event[0][1]
duration = event[0][2]
event_name = event[0][4]
event_begin = t
event_end = event_begin + duration
else:
service = self.session.nav.getCurrentService()
info = service and service.info()
event = info and info.getEvent(NowNext)
if event:
event_name = event.getEventName()
event_begin = event.getBeginTime()
duration = event.getDuration()
event_end = event_begin + duration
Yes. Although you also need the duo2lcd4linux.patch (but not the duo2lcd4linux-fix-standby.patch) from files (one level up) as well. And apply it.@birdman: where do i find the lcd4linux that is used in vix 4.0?
this one?
https://github.com/OpenVuPlus/openv...s-vuplus/duo2lcd4linux/files/LCD4linux.tar.gz
In what way "wrong"?to me it looks like in some cases the wrong path is taken... the if path instead of the else???
Checked for what?also: shouldn't first the now/next be checked???
Until we know which of the two paths is used when it goes wrong it's all just guessing.or the cause is in the event.getDuration function.
So, time is actually 21:30:xx (xx non-zero). time remaining is 29:yy (xx+yy == 60). Time displayed is whole minutes left.what i also found is that the remaining time is always 1 minute off for all events.
clock shows 21:30, event ends 22:00, remaining time is 29 mins.
def getServiceInfo(self,NowNext):
self.epgcache = eEPGCache.getInstance()
event_begin = 0
event_end = 0
duration = 0
event_name = ""
if self.epgcache is not None:
sref = self.session.nav.getCurrentlyPlayingServiceReference()
if sref is not None:
service = self.session.nav.getCurrentService()
info = service and service.info()
event = info and info.getEvent(NowNext)
if event:
event_name = event.getEventName()
event_begin = event.getBeginTime()
duration = event.getDuration()
event_end = event_begin + duration
else:
event = self.epgcache.lookupEvent(['IBDCTSERNX', (sref.toString(), NowNext, -1)])
event_begin = 0
if event:
if event[0][4]:
t = event[0][1]
duration = event[0][2]
event_name = event[0][4]
event_begin = t
event_end = event_begin + duration
return event_begin, event_end, duration, event_name
that might be a good start...
--- plugin.py.orig 2016-04-11 12:58:29.378320817 +0100
+++ plugin.py 2016-04-11 13:18:12.567481517 +0100
@@ -1479,6 +1479,9 @@
return number
return None
+#GML
+Oddity_Reported = False
+
def getServiceInfo(self,NowNext):
self.epgcache = eEPGCache.getInstance()
event_begin = 0
@@ -1490,14 +1493,17 @@
if sref is not None:
event = self.epgcache.lookupEvent(['IBDCTSERNX', (sref.toString(), NowNext, -1)])
event_begin = 0
+ method = 0 # GML
if event:
if event[0][4]:
+ method = 1 # GML
t = event[0][1]
duration = event[0][2]
event_name = event[0][4]
event_begin = t
event_end = event_begin + duration
else:
+ method = 2 # GML
service = self.session.nav.getCurrentService()
info = service and service.info()
event = info and info.getEvent(NowNext)
@@ -1506,6 +1512,12 @@
event_begin = event.getBeginTime()
duration = event.getDuration()
event_end = event_begin + duration
+#GML
+ now = int(time())
+ if ((event_end - now) > 86400) and not Oddity_Reported: # > 1 day
+ Oddity_Reported = True
+ print "[LCD4Linux ODDITY] at %d: method %d, event_begin %d, duration %d, event_name %s" % (now, method, event_begin, duration, event_name)
+
return event_begin, event_end, duration, event_name
def getResolution(t):