Skip to content

Commit e516f54

Browse files
committed
[Navigation] Update. Based on OpenATV
1 parent 6a87e4c commit e516f54

File tree

11 files changed

+1595
-186
lines changed

11 files changed

+1595
-186
lines changed

data/setup.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@
7070
<item level="2" text="Fan operation" description="Configure how the fan should operate" requires="Fan">config.usage.fan</item>
7171
<item level="2" text="Fan speed" description="Configure the speed of the fan" requires="FanPWM">config.usage.fanspeed</item>
7272
<item level="2" text="Wake On LAN" description="When enabled the set top box is able to wakeup on LAN" requires="WakeOnLAN">config.usage.wakeOnLAN</item>
73+
<item level="2" text="Wake up time before a timer begins [mins]" description="The default settings are 5 minutes earlier to wake up from deep standby. It possibly may be necessary to change this. (e.g.: the actual wake-up time is inaccurate or to late, waiting to a network-drive, etc.)">config.workaround.wakeuptime</item>
74+
<item level="1" text="Use workaround for wake up from deep-standby" description="If enabled, using a time window to detect a wake up from deep standby by a timer. Default setting ist disabled and used a special signal from the receiver. But some devices set a wrong or none signal and the wake up detection can fails.">config.workaround.deeprecord</item>
75+
<item level="2" text="Time window for detection of the wake up by a timer [mins]" description="The default settings are wake up time - 5 minutes and timer begin time + 5 minutes. This setting changed the time window before the wake up time. So can be detected a wake up by a timer even at very early starting receivers." requires="config.workaround.deeprecord">config.workaround.wakeupwindow</item>
7376
<item level="1" text="Startup to Standby" description="Startup the set top box in standby">config.usage.startup_to_standby</item>
7477
<item level="2" text="Config resolution of pictures" description="Select in which resolution pictures are displayed with picture viewer or movie player.">config.usage.pic_resolution</item>
7578
<item level="2" text="Ignore DVB-S namespace sub network" description="On valid ONIDs, ignore frequency sub network part">config.usage.subnetwork</item>
@@ -395,6 +398,7 @@
395398
<item level="2" text="Include action map data" description="Enable this option to add action map / remote control mapping data to the debug log file.">config.crash.debugActionMaps</item>
396399
<item level="2" text="Include screen load data" description="Enable this option to add screen names and resolution data to the debug log file.">config.crash.debugScreens</item>
397400
<item level="2" text="Include opkg output data" description="Enable this option to add opkg output data to the debug log file.">config.crash.debugOpkg</item>
401+
<item level="2" text="Include timer data" description="Enable this option to add timer debugging data to the debug log file.">config.crash.debugTimers</item>
398402
<item level="2" text="Include DVB scan data" description="Enable this option to add extra DVB scan data to the debug log file.">config.crash.debugDVBScan</item>
399403
<item level="2" text="Include DVB timesync data" description="Enable this option to add extra DVB time sync data to the debug log file.">config.crash.debugDVBTime</item>
400404
<item level="2" text="Include DVB details" description="Enable this option to add extra DVB details to the debug log file.">config.crash.debugDVB</item>

lib/python/Components/HdmiCec.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@
7676
"activity": _("Any activity"),
7777
},
7878
default="streamrequest")
79+
config.hdmicec.advanced_settings = ConfigYesNo(default=False)
80+
config.hdmicec.deepstandby_waitfortimesync = ConfigYesNo(default=True)
81+
config.hdmicec.tv_wakeup_zaptimer = ConfigYesNo(default=True)
82+
config.hdmicec.tv_wakeup_zapandrecordtimer = ConfigYesNo(default=True)
83+
config.hdmicec.tv_wakeup_wakeuppowertimer = ConfigYesNo(default=True)
84+
config.hdmicec.check_tv_state = ConfigYesNo(default=False)
7985
config.hdmicec.tv_wakeup_command = ConfigSelection(
8086
choices={
8187
"imageview": _("Image View On"),

lib/python/Components/Sources/CurrentService.py

Lines changed: 22 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,55 @@
1-
# -*- coding: utf-8 -*-
1+
from enigma import iPlayableService
2+
3+
from Components.Element import cached
24
from Components.PerServiceDisplay import PerServiceBase
3-
from enigma import iPlayableService, iPlayableService, eServiceCenter
45
from Components.Sources.Source import Source
5-
from Components.Element import cached
66
import NavigationInstance
77

88

99
class CurrentService(PerServiceBase, Source):
1010
def __init__(self, navcore):
1111
Source.__init__(self)
12-
PerServiceBase.__init__(self, navcore,
13-
{
14-
iPlayableService.evStart: self.serviceEvent,
15-
iPlayableService.evEnd: self.serviceEvent,
16-
# FIXME: we should check 'interesting_events'
17-
# which is not always provided.
18-
iPlayableService.evUpdatedInfo: self.serviceEvent,
19-
iPlayableService.evUpdatedEventInfo: self.serviceEvent,
20-
iPlayableService.evNewProgramInfo: self.serviceEvent,
21-
iPlayableService.evCuesheetChanged: self.serviceEvent,
22-
iPlayableService.evVideoSizeChanged: self.serviceEvent,
23-
iPlayableService.evVideoGammaChanged: self.serviceEvent,
24-
iPlayableService.evHBBTVInfo: self.serviceEvent
25-
}, with_event=True)
12+
PerServiceBase.__init__(self, navcore, {
13+
iPlayableService.evStart: self.serviceEvent,
14+
iPlayableService.evEnd: self.serviceEvent,
15+
# FIXME: We should check 'interesting_events' which is not always provided.
16+
iPlayableService.evUpdatedInfo: self.serviceEvent,
17+
iPlayableService.evUpdatedEventInfo: self.serviceEvent,
18+
iPlayableService.evNewProgramInfo: self.serviceEvent,
19+
iPlayableService.evCuesheetChanged: self.serviceEvent,
20+
iPlayableService.evVideoSizeChanged: self.serviceEvent,
21+
iPlayableService.evVideoGammaChanged: self.serviceEvent,
22+
iPlayableService.evHBBTVInfo: self.serviceEvent
23+
}, with_event=True)
2624
self.navcore = navcore
27-
self.srv = None
28-
self.info = None
2925
self.ref = None
30-
self.onManualNewService = []
3126

3227
def serviceEvent(self, event):
33-
self.srv = None
34-
self.info = None
3528
self.changed((self.CHANGED_SPECIFIC, event))
3629

3730
@cached
3831
def getCurrentService(self):
39-
return self.srv or self.navcore.getCurrentService()
32+
return self.navcore.getCurrentService()
33+
34+
def getCurrentServiceReference(self):
35+
return self.navcore.getCurrentlyPlayingServiceReference()
4036

4137
service = property(getCurrentService)
4238

4339
@cached
4440
def getCurrentServiceRef(self):
4541
if self.ref:
4642
return self.ref
47-
if NavigationInstance.instance is not None:
48-
return self.srv or NavigationInstance.instance.getCurrentlyPlayingServiceOrGroup()
49-
return None
43+
return NavigationInstance.instance.getCurrentlyPlayingServiceOrGroup() if NavigationInstance.instance is not None else None
5044

5145
def setCurrentServiceRef(self, ref):
5246
self.ref = ref
5347

54-
serviceref = property(getCurrentServiceRef, setCurrentServiceRef)
55-
56-
def newService(self, ref):
57-
if ref and isinstance(ref, bool):
58-
self.srv = None
59-
elif ref:
60-
self.srv = ref
61-
self.info = eServiceCenter.getInstance().info(ref)
62-
else:
63-
self.srv = ref
64-
65-
for x in self.onManualNewService:
66-
x()
67-
68-
self.changed((self.CHANGED_SPECIFIC, iPlayableService.evStart))
48+
serviceref = property(getCurrentServiceRef, setCurrentServiceRef) # TODO: serviceRef
6949

7050
@cached
7151
def getCurrentBouquetName(self):
72-
if NavigationInstance.instance is not None:
73-
return NavigationInstance.instance.currentBouquetName
74-
return ""
52+
return NavigationInstance.instance.currentBouquetName if NavigationInstance.instance is not None else ""
7553

7654
currentBouquetName = property(getCurrentBouquetName)
7755

lib/python/Components/UsageConfig.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,6 +2081,11 @@ def preferredTunerChoicesUpdate(update=False):
20812081
atsc_nims.append((str(slot.slot), slot.getSlotName()))
20822082
nims.append((str(slot.slot), slot.getSlotName()))
20832083

2084+
config.workaround = ConfigSubsection()
2085+
config.workaround.deeprecord = ConfigYesNo(default=False)
2086+
config.workaround.wakeuptime = ConfigSelectionNumber(default=5, stepwidth=1, min=0, max=30, wraparound=True)
2087+
config.workaround.wakeupwindow = ConfigSelectionNumber(default=5, stepwidth=5, min=5, max=60, wraparound=True)
2088+
20842089
config.usage.menutype = ConfigSelection(default="standard", choices=[
20852090
("horzanim", _("Horizontal menu")),
20862091
("horzicon", _("Horizontal icons")),

lib/python/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ install_PYTHON = \
1111
Navigation.py \
1212
NavigationInstance.py \
1313
RecordTimer.py \
14+
Scheduler.py \
1415
ServiceReference.py \
1516
skin.py \
1617
StartEnigma.py \

0 commit comments

Comments
 (0)