Skip to content

Commit

Permalink
Merge OpenViX
Browse files Browse the repository at this point in the history
  • Loading branch information
Ev0-BH committed Oct 2, 2023
2 parents 118358a + a0499aa commit 64202b9
Show file tree
Hide file tree
Showing 25 changed files with 271 additions and 260 deletions.
13 changes: 12 additions & 1 deletion data/display800/skin_display_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -415,5 +415,16 @@
<!-- EPG -->
<screen name="EPGExtensionsList_summary" position="0,0" size="800,480">
<widget source="parent.Title" render="Label" position="40,20" size="720,250" font="FdLcD;80" halign="center" valign="center" foregroundColor="white" />
</screen>
</screen>

<!-- TimerEditListSummary -->
<screen name="TimerEditListSummary" position="0,0" size="800,480">
<widget source="parent.Title" render="Label" position="0,0" size="e,90" font="FdLcD;85" halign="center" valign="center" noWrap="1" />
<widget source="service" render="Label" position="0,120" size="e,70" font="FdLcD;65" halign="center" valign="center" noWrap="1" />
<widget source="name" render="Label" position="0,220" size="e,60" font="FdLcD;50" halign="center" valign="center" />
<widget source="time" render="Label" position="0,310" size="c,60" font="FdLcD;60" halign="center" valign="center" transparent="1" />
<widget source="duration" render="Label" position="c,310" size="c,60" font="FdLcD;60" halign="center" valign="center" transparent="1" />
<widget source="state" render="Label" position="0,380" size="e,80" font="FdLcD;65" halign="center" valign="center" transparent="1" />
</screen>

</skin>
12 changes: 6 additions & 6 deletions lib/python/Components/About.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ def getCpuCoresInt():
def getCpuCoresString():
cores = getCpuCoresInt()
return {
0: _("Unavailable"),
1: _("Single Core"),
2: _("Dual Core"),
4: _("Quad Core"),
8: _("Octo Core")
}.get(cores, _("%d cores") % cores)
0: _("Unavailable"),
1: _("Single core"),
2: _("Dual core"),
4: _("Quad core"),
8: _("Octo core")
}.get(cores, _("%d cores") % cores)


def _ifinfo(sock, addr, ifname):
Expand Down
6 changes: 3 additions & 3 deletions lib/python/Components/ActionMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def __init__(self, contexts=None, actions=None, prio=0):
unknown.remove(action)
break
# if unknown:
# print("")
# print("[ActionMap] Keymap(s) '%s' -> Undefined action(s) '%s'." % (", ".join(contexts), ", ".join(unknown)))
# print("")
# print("[ActionMap] Keymap(s) '%s' -> Undefined action(s) '%s'." % (", ".join(contexts), ", ".join(unknown)))

def setEnabled(self, enabled):
self.enabled = enabled
Expand Down Expand Up @@ -91,7 +91,7 @@ class HelpableActionMap(ActionMap):
# ActionMapconstructor, the collected helpstrings (with correct
# context, action) is added to the screen's "helpList", which will
# be picked up by the "HelpableScreen".
######### do not change this code that has been modified for python 3 use!#########
# do not change this code that has been modified for python 3 use!
def __init__(self, parent, contexts, actions=None, prio=0, description=None):
def exists(record):
for context in parent.helpList:
Expand Down
6 changes: 3 additions & 3 deletions lib/python/Components/Converter/VAudioInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ def __init__(self, type):
"17_vorbis": ("vorbis",),
"18_opus": ("opus",),
"19_amr": ("amr",),
}
}
self.codec_info = {
"dolbytruehd": ("51", "20", "71"),
"dolbydigitalplus": ("51", "20", "71"),
"dolbydigital": ("51", "20", "71"),
"wma": ("8", "9"),
}
}
self.type, self.interesting_events = {
"AudioIcon": (self.GET_AUDIO_ICON, (iPlayableService.evUpdatedInfo,)),
"AudioCodec": (self.GET_AUDIO_CODEC, (iPlayableService.evUpdatedInfo,)),
}[type]
}[type]

def getAudio(self):
service = self.source.service
Expand Down
32 changes: 16 additions & 16 deletions lib/python/Components/EpgBouquetList.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,28 +189,28 @@ def buildEntry(self, name, service):
if self.graphic:
if borderTopPix is not None:
res.append(MultiContentEntryPixmapAlphaBlend(
pos=(left, r1.top()),
size=(r1.width(), self.borderWidth),
png=borderTopPix,
flags=BT_SCALE))
pos=(left, r1.top()),
size=(r1.width(), self.borderWidth),
png=borderTopPix,
flags=BT_SCALE))
if borderBottomPix is not None:
res.append(MultiContentEntryPixmapAlphaBlend(
pos=(left, r1.height() - self.borderWidth),
size=(r1.width(), self.borderWidth),
png=borderBottomPix,
flags=BT_SCALE))
pos=(left, r1.height() - self.borderWidth),
size=(r1.width(), self.borderWidth),
png=borderBottomPix,
flags=BT_SCALE))
if borderLeftPix is not None:
res.append(MultiContentEntryPixmapAlphaBlend(
pos=(left, r1.top()),
size=(self.borderWidth, r1.height()),
png=borderLeftPix,
flags=BT_SCALE))
pos=(left, r1.top()),
size=(self.borderWidth, r1.height()),
png=borderLeftPix,
flags=BT_SCALE))
if borderRightPix is not None:
res.append(MultiContentEntryPixmapAlphaBlend(
pos=(r1.width() - self.borderWidth, left),
size=(self.borderWidth, r1.height()),
png=borderRightPix,
flags=BT_SCALE))
pos=(r1.width() - self.borderWidth, left),
size=(self.borderWidth, r1.height()),
png=borderRightPix,
flags=BT_SCALE))

return res

Expand Down
12 changes: 6 additions & 6 deletions lib/python/Components/EpgConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ def InitEPGConfig():
config.epgselection.grid.primetime = ConfigClock(default=(20, 0))
config.epgselection.grid.servicetitle_mode = ConfigSelection(default="servicename", choices=serviceTitleChoices)
possibleAlignmentChoices = [
(str(RT_HALIGN_LEFT | RT_VALIGN_CENTER), _("left")),
(str(RT_HALIGN_CENTER | RT_VALIGN_CENTER), _("centered")),
(str(RT_HALIGN_RIGHT | RT_VALIGN_CENTER), _("right")),
(str(RT_HALIGN_LEFT | RT_VALIGN_CENTER | RT_WRAP), _("left, wrapped")),
(str(RT_HALIGN_CENTER | RT_VALIGN_CENTER | RT_WRAP), _("centered, wrapped")),
(str(RT_HALIGN_RIGHT | RT_VALIGN_CENTER | RT_WRAP), _("right, wrapped"))]
(str(RT_HALIGN_LEFT | RT_VALIGN_CENTER), _("left")),
(str(RT_HALIGN_CENTER | RT_VALIGN_CENTER), _("centered")),
(str(RT_HALIGN_RIGHT | RT_VALIGN_CENTER), _("right")),
(str(RT_HALIGN_LEFT | RT_VALIGN_CENTER | RT_WRAP), _("left, wrapped")),
(str(RT_HALIGN_CENTER | RT_VALIGN_CENTER | RT_WRAP), _("centered, wrapped")),
(str(RT_HALIGN_RIGHT | RT_VALIGN_CENTER | RT_WRAP), _("right, wrapped"))]
config.epgselection.grid.servicename_alignment = ConfigSelection(default=possibleAlignmentChoices[0][0], choices=possibleAlignmentChoices)
config.epgselection.grid.servicenumber_alignment = ConfigSelection(default=possibleAlignmentChoices[0][0], choices=possibleAlignmentChoices)
config.epgselection.grid.event_alignment = ConfigSelection(default=possibleAlignmentChoices[0][0], choices=possibleAlignmentChoices)
Expand Down
18 changes: 9 additions & 9 deletions lib/python/Components/InputDevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def getDeviceList(self):
return sorted(iter(self.Devices.keys()))

def setDeviceAttribute(self, device, attribute, value):
#print("[InputDevice] setting for device", device, "attribute", attribute, " to value", value)
# print("[InputDevice] setting for device", device, "attribute", attribute, " to value", value)
if device in self.Devices:
self.Devices[device][attribute] = value

Expand All @@ -87,21 +87,21 @@ def getDeviceAttribute(self, device, attribute):

def setEnabled(self, device, value):
oldval = self.getDeviceAttribute(device, 'enabled')
#print("[InputDevice] setEnabled for device %s to %s from %s" % (device,value,oldval))
# print("[InputDevice] setEnabled for device %s to %s from %s" % (device,value,oldval))
self.setDeviceAttribute(device, 'enabled', value)
if oldval is True and value is False:
self.setDefaults(device)

def setName(self, device, value):
#print("[InputDevice] setName for device %s to %s" % (device,value))
# print("[InputDevice] setName for device %s to %s" % (device,value))
self.setDeviceAttribute(device, 'configuredName', value)

#struct input_event {
# struct timeval time; -> ignored
# __u16 type; -> EV_REP (0x14)
# __u16 code; -> REP_DELAY (0x00) or REP_PERIOD (0x01)
# __s32 value; -> DEFAULTS: 700(REP_DELAY) or 100(REP_PERIOD)
#}; -> size = 16
# struct input_event {
# struct timeval time; -> ignored
# __u16 type; -> EV_REP (0x14)
# __u16 code; -> REP_DELAY (0x00) or REP_PERIOD (0x01)
# __s32 value; -> DEFAULTS: 700(REP_DELAY) or 100(REP_PERIOD)
# }; -> size = 16

def setDefaults(self, device):
print("[InputDevice] setDefaults for device %s" % device)
Expand Down
38 changes: 19 additions & 19 deletions lib/python/Components/Lcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,19 +430,19 @@ def lcdLiveTvChanged(configElement):
elif can_lcdmodechecking and getBoxType() in ('gbquad4k', 'gbue4k'):
# (0:normal, 1:video0, 2:fb, 3:vide0+fb, 4:video1, 5:vide0+video1, 6:video1+fb, 7:video0+video1+fb)
config.lcd.minitvmode = ConfigSelection(default="0", choices=[
("0", _("normal")),
("1", _("MiniTV") + _(" - video0")),
("3", _("MiniTV with OSD") + _(" - video0")),
("2", _("OSD")),
("4", _("MiniTV") + _(" - video1")),
("6", _("MiniTV with OSD") + _(" - video1")),
("5", _("MiniTV") + _(" - video0+video1")),
("7", _("MiniTV with OSD") + _(" - video0+video1"))])
("0", _("normal")),
("1", _("MiniTV") + _(" - video0")),
("3", _("MiniTV with OSD") + _(" - video0")),
("2", _("OSD")),
("4", _("MiniTV") + _(" - video1")),
("6", _("MiniTV with OSD") + _(" - video1")),
("5", _("MiniTV") + _(" - video0+video1")),
("7", _("MiniTV with OSD") + _(" - video0+video1"))])
config.lcd.minitvmode.addNotifier(setLCDminitvmode)
config.lcd.minitvpipmode = ConfigSelection(default="0", choices=[
("0", _("off")),
("4", _("PIP")),
("6", _("PIP with OSD"))])
("0", _("off")),
("4", _("PIP")),
("6", _("PIP with OSD"))])
config.lcd.minitvpipmode.addNotifier(setLCDminitvpipmode)
config.lcd.minitvfps = ConfigSlider(default=30, limits=(0, 30))
config.lcd.minitvfps.addNotifier(setLCDminitvfps)
Expand All @@ -468,21 +468,21 @@ def scroll_delay(el):
def initial_scroll_delay(el):
open(SystemInfo["VFD_initial_scroll_delay"], "w").write(el.value)
choicelist = [
("10000", "10 " + _("seconds")),
("20000", "20 " + _("seconds")),
("30000", "30 " + _("seconds")),
("0", _("no delay"))]
("10000", "10 " + _("seconds")),
("20000", "20 " + _("seconds")),
("30000", "30 " + _("seconds")),
("0", _("no delay"))]
config.usage.vfd_initial_scroll_delay = ConfigSelection(default="1000", choices=choicelist)
config.usage.vfd_initial_scroll_delay.addNotifier(initial_scroll_delay, immediate_feedback=False)

if SystemInfo["VFD_final_scroll_delay"] and getDisplayType() not in ('7segment'):
def final_scroll_delay(el):
open(SystemInfo["VFD_final_scroll_delay"], "w").write(el.value)
choicelist = [
("10000", "10 " + _("seconds")),
("20000", "20 " + _("seconds")),
("30000", "30 " + _("seconds")),
("0", _("no delay"))]
("10000", "10 " + _("seconds")),
("20000", "20 " + _("seconds")),
("30000", "30 " + _("seconds")),
("0", _("no delay"))]
config.usage.vfd_final_scroll_delay = ConfigSelection(default="1000", choices=choicelist)
config.usage.vfd_final_scroll_delay.addNotifier(final_scroll_delay, immediate_feedback=False)

Expand Down
38 changes: 19 additions & 19 deletions lib/python/Components/NimManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,16 +548,16 @@ def __init__(self, slot, sattype, description, has_outputs=True, internally_conn
self.is_fbc = is_fbc

self.compatible = {
None: (None,),
"DVB-S": ("DVB-S", None),
"DVB-C": ("DVB-C", None),
"DVB-T": ("DVB-T", None),
"DVB-S2": ("DVB-S", "DVB-S2", None),
"DVB-S2X": ("DVB-S", "DVB-S2", "DVB-S2X", None),
"DVB-C2": ("DVB-C", "DVB-C2", None),
"DVB-T2": ("DVB-T", "DVB-T2", None),
"ATSC": ("ATSC", None),
}
None: (None,),
"DVB-S": ("DVB-S", None),
"DVB-C": ("DVB-C", None),
"DVB-T": ("DVB-T", None),
"DVB-S2": ("DVB-S", "DVB-S2", None),
"DVB-S2X": ("DVB-S", "DVB-S2", "DVB-S2X", None),
"DVB-C2": ("DVB-C", "DVB-C2", None),
"DVB-T2": ("DVB-T", "DVB-T2", None),
"ATSC": ("ATSC", None),
}

# get multi sat type using delsys information
self.combined = False
Expand Down Expand Up @@ -607,15 +607,15 @@ def getType(self):

def connectableTo(self):
connectable = {
"DVB-S": ("DVB-S", "DVB-S2", "DVB-S2X"),
"DVB-C": ("DVB-C", "DVB-C2"),
"DVB-T": ("DVB-T", "DVB-T2"),
"DVB-S2": ("DVB-S", "DVB-S2", "DVB-S2X"),
"DVB-S2X": ("DVB-S", "DVB-S2", "DVB-S2X"),
"DVB-C2": ("DVB-C", "DVB-C2"),
"DVB-T2": ("DVB-T", "DVB-T2"),
"ATSC": ("ATSC"),
}
"DVB-S": ("DVB-S", "DVB-S2", "DVB-S2X"),
"DVB-C": ("DVB-C", "DVB-C2"),
"DVB-T": ("DVB-T", "DVB-T2"),
"DVB-S2": ("DVB-S", "DVB-S2", "DVB-S2X"),
"DVB-S2X": ("DVB-S", "DVB-S2", "DVB-S2X"),
"DVB-C2": ("DVB-C", "DVB-C2"),
"DVB-T2": ("DVB-T", "DVB-T2"),
"ATSC": ("ATSC"),
}
return connectable[self.getType()]

def getSlotID(self, slot=None):
Expand Down
2 changes: 1 addition & 1 deletion lib/python/Components/ParentalControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def servicePinEntered(self, service, result=None):

def saveListToFile(self, sWhichList, vList):
# Replaces saveWhiteList and saveBlackList:
#I don't like to have two functions with identical code...
# I don't like to have two functions with identical code...
file = open(resolveFilename(SCOPE_CONFIG, sWhichList), 'w')
for sService, sType in vList.items():
# Only Services that are selected directly and Bouqets are saved.
Expand Down
10 changes: 5 additions & 5 deletions lib/python/Components/Playlist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from os import path
from os import ospath

from enigma import eServiceReference
from ServiceReference import ServiceReference
Expand Down Expand Up @@ -31,13 +31,13 @@ def addService(self, service):

def getRef(self, filename, entry):
if entry[0] == "/":
path = entry
refPath = entry
else:
path = path.dirname(filename) + "/" + entry # this name swapping with "path" is very confussing and should be fixed
refPath = ospath.dirname(filename) + "/" + entry
for proto in self.REMOTE_PROTOS:
if entry.startswith(proto):
path = entry
ref = eServiceReference(4097, 0, path)
refPath = entry
ref = eServiceReference(4097, 0, refPath)
return ServiceReference(ref)


Expand Down
4 changes: 2 additions & 2 deletions lib/python/Components/PowerTimerList.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ def buildTimerEntry(self, timer, processed):
TIMERTYPE.DEEPSTANDBY: _("Deep Standby"),
TIMERTYPE.REBOOT: _("Reboot"),
TIMERTYPE.RESTART: _("Restart GUI")
}[timer.timerType]
}[timer.timerType]

afterevent = {
AFTEREVENT.NONE: _("Nothing"),
AFTEREVENT.WAKEUPTOSTANDBY: _("Wake Up To Standby"),
AFTEREVENT.STANDBY: _("Standby"),
AFTEREVENT.DEEPSTANDBY: _("Deep Standby")
}[timer.afterEvent]
}[timer.afterEvent]

height = self.l.getItemSize().height()
width = self.l.getItemSize().width()
Expand Down
6 changes: 3 additions & 3 deletions lib/python/Components/Renderer/Listbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ def setScrollbarMode(self, mode):
if self.instance is not None:
self.instance.setScrollbarMode(int(
{
"showOnDemand": eListbox.showOnDemand,
"showAlways": eListbox.showAlways,
"showNever": eListbox.showNever,
"showOnDemand": eListbox.showOnDemand,
"showAlways": eListbox.showAlways,
"showNever": eListbox.showNever,
}[mode]))

scrollbarMode = property(lambda self: self.__scrollbarMode, setScrollbarMode)
Expand Down
2 changes: 1 addition & 1 deletion lib/python/Components/Renderer/RunningText.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def retValue(val, limit, default, Min=False):

def setWrapFlag(attrib, value):
if (attrib.lower() == "wrap" and value == "0") or \
(attrib.lower() == "nowrap" and value != "0"):
(attrib.lower() == "nowrap" and value != "0"):
self.txtflags &= ~RT_WRAP
else:
self.txtflags |= RT_WRAP
Expand Down
3 changes: 1 addition & 2 deletions lib/python/Components/Renderer/YWeatherPicon.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#(c) 2boom mod 2012
# (c) 2boom mod 2012

from Components.Renderer.Renderer import Renderer
from enigma import ePixmap, eTimer
from Tools.Directories import fileExists, SCOPE_SKIN_IMAGE, SCOPE_CURRENT_SKIN, resolveFilename
from Tools.LoadPixmap import LoadPixmap
from Components.config import * # This needs fixing. We need to know what we are importing.


class YWeatherPicon(Renderer):
Expand Down
1 change: 1 addition & 0 deletions lib/python/Plugins/Extensions/PicturePlayer/ui.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from enigma import ePicLoad, eTimer, getDesktop, gMainDC, eSize

from Components.ActionMap import ActionMap
from Components.AVSwitch import AVSwitch
from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSelection, ConfigText, ConfigYesNo, getConfigListEntry
from Components.ConfigList import ConfigListScreen
from Components.FileList import FileList
Expand Down

0 comments on commit 64202b9

Please sign in to comment.