Skip to content

Commit

Permalink
Merge branch 'master' into 7.3
Browse files Browse the repository at this point in the history
* master: (30 commits)
  translation update
  [eDVBChannel] * getNextSourceSpan add missing align
  [AVSwitch] * print readAvailableModes only once on init * call readAvailableModes only once in getModeList
  [LCD/IconCheckPoller] (#3019)
  [CiSelection] (#2987)
  [InfoBarGenerics / subservice] (#3004)
  [unicable] add LNB Fuba DEK 124
  [Satconfig] * correction of menu selection
  [NimManager] * remove scr from fbc auto config because this cause strange issues
  [frontend] * add rs6060 snr fix
  [StartWizard] * skip create swap step if swap already exists
  [UsageConfig] Add qaf to original language cherrypick BlackHole/enigma2@6eedd8a
  [ChannelSelection] (#3003)
  [MovieSelection] (#3002)
  translation update
  [InputDevice] * improve default keyboard map
  InputDeviceSetup h7 default code is 21
  [FlashManager] * add blue Download button for download only * redesign distribution handling * don't show downloaded images if other distros selected * improve actionmap for blue button
  Show Failed info in RecordTimerOverview / Fix sort issue in RecordTimerOverview and PowerTimerOverview (#2993)
  translation update
  ...
  • Loading branch information
jbleyel committed Aug 25, 2023
2 parents d9ca31b + 09c0449 commit 0cf8210
Show file tree
Hide file tree
Showing 68 changed files with 955 additions and 1,034 deletions.
26 changes: 0 additions & 26 deletions data/groupedservices
Expand Up @@ -150,29 +150,3 @@
1:0:1:32D0:45D:1:C00000:0:0:0: #ORF 2 T
1:0:1:32D1:45D:1:C00000:0:0:0: #ORF 2 V
1:0:1:32CB:45D:1:C00000:0:0:0: #ORF 2 W
# HD Plus
1:0:19:EF74:3F9:1:C00000:0:0:0: #Sat1 HD
1:0:19:EF10:421:1:C00000:0:0:0: #RTL HD
1:0:19:EF15:421:1:C00000:0:0:0: #RTL2 HD
1:0:19:2E9B:411:1:C00000:0:0:0: #Super RTL HD
1:0:19:EF76:3F9:1:C00000:0:0:0: #kabel eins HD
1:0:19:EF11:421:1:C00000:0:0:0: #Vox HD
1:0:19:EF75:3F9:1:C00000:0:0:0: #ProSieben HD
1:0:19:EF78:3F9:1:C00000:0:0:0: #ProSieben MAXX HD
1:0:19:151A:455:1:C00000:0:0:0: #DMAX HD
1:0:19:5274:41D:1:C00000:0:0:0: #Welt HD
1:0:19:1519:455:1:C00000:0:0:0: #TELE 5 HD
1:0:19:EF14:421:1:C00000:0:0:0: #n-tv HD
1:0:19:1581:41F:1:C00000:0:0:0: #Sport1 HD
1:0:19:5273:41D:1:C00000:0:0:0: #Nick/MTV+ HD
1:0:19:EF77:3F9:1:C00000:0:0:0: #sixx HD
1:0:19:157F:41F:1:C00000:0:0:0: #DELUXE MUSIC HD
1:0:19:2777:409:1:C00000:0:0:0: #MTV HD
1:0:19:2EAF:411:1:C00000:0:0:0: #RTL Nitro HD
1:0:19:30D4:413:1:C00000:0:0:0: #SAT.1 Gold HD
1:0:19:2774:409:1:C00000:0:0:0: #TLC HD
1:0:19:157C:41F:1:C00000:0:0:0: #Disney Channel HD
1:0:19:1392:3EA:1:C00000:0:0:0: #INSIGHT TV HD
1:0:1F:2:40B:1:C00000:0:0:0: #UHD1 by Astra HD
1:0:1F:183A:40B:1:C00000:0:0:0: #Travelxp 4k
1:0:1F:307A:3F5:1:C00000:0:0:0: #RTL UHD
1 change: 1 addition & 0 deletions data/setup.xml
Expand Up @@ -884,6 +884,7 @@
<item level="0" text="Show time remaining/elapsed" description="This option allows you choose how to display remaining time, or elapsed time, or both.">config.usage.swap_time_remaining_on_osd</item>
<item level="0" text="Show time elapsed as positive" description="This option allows you choose how to display elapsed time as + or -">config.usage.elapsed_time_positive_osd</item>
<item level="0" text="Show transponder remaining/elapsed as" description="This option allows you choose how to display the remaining/elapsed time for live tv.">config.usage.swap_time_display_on_osd</item>
<item level="0" text="Show subservices *" description="This option allows you choose the option for subservice indicator or selection.">config.usage.show_infobar_subservices</item>
<item level="0" text="Media playback Remaining/Elapsed as" description="This option allows you choose how to display the remaining/elapsed time for media playback.">config.usage.swap_media_time_display_on_osd</item>
<item level="2" text="Hide zap errors" description="Hide any zap error messages.">config.usage.hide_zap_errors</item>
<item level="2" text="Hide CI messages" description="Hide error messages from the Common Interface module.">config.usage.hide_ci_messages</item>
Expand Down
2 changes: 1 addition & 1 deletion data/startwizard.xml
Expand Up @@ -22,7 +22,7 @@ if self.isFlashExpanderActive() and self.getFreeMemory() &lt; 128:

<step id="swap" nextstep="swapretry">
<condition>
self.condition = not self.smallFlashSize and self.getFreeMemory() &lt; 128
self.condition = not self.smallFlashSize and self.getFreeMemory() &lt; 128 and not self.swapExists
</condition>
<buttons enable="OK,UP,DOWN" />
<text value="The %s %s has a limited memory capacity. A swap file is required to increase the amount of available memory otherwise the %s %s may not work properly. Select the target device to hold the swap file."/>
Expand Down
2 changes: 1 addition & 1 deletion lib/dvb/dvb.cpp
Expand Up @@ -2223,7 +2223,7 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off
if (current_offset < i->second)
{
start = current_offset;
size = diff_upto(i->second, start, max);
size = align(diff_upto(i->second, start, max), blocksize);
//eDebug("[eDVBChannel] HIT, %lld < %lld < %lld, size: %zd", i->first, current_offset, i->second, size);
return;
}
Expand Down
5 changes: 5 additions & 0 deletions lib/dvb/pvrparse.cpp
Expand Up @@ -650,6 +650,11 @@ int eMPEGStreamInformationWriter::stopSave(void)
if (m_access_points.empty() && (m_streamtime_access_points.size() <= 1))
// Nothing to save, don't create an ap file at all
return 1;

// do not create access points if there is no recording file
if (::access(m_filename.c_str(), R_OK) < 0)
return 1;

std::string ap_filename(m_filename);
ap_filename += ".ap";
{
Expand Down
13 changes: 7 additions & 6 deletions lib/python/Components/AVSwitch.py
Expand Up @@ -196,14 +196,13 @@ def __init__(self):
self.on_hotplug = CList()
self.current_mode = None
self.current_port = None
self.readAvailableModes()
print("[AVSwitch] getAvailableModes:'%s'" % eAVControl.getInstance().getAvailableModes())
self.is24hzAvailable()
self.readPreferredModes()
self.createConfig()

def readAvailableModes(self):
modes = eAVControl.getInstance().getAvailableModes()
print("[AVSwitch] getAvailableModes:'%s'" % modes)
return modes.split()

def is24hzAvailable(self):
Expand Down Expand Up @@ -292,11 +291,11 @@ def createConfig(self, *args):
def isPortAvailable(self, port): # Fix me!
return True

def isModeAvailable(self, port, mode, rate): # Check if a high-level mode with a given rate is available.
def isModeAvailable(self, port, mode, rate, availableModes): # Check if a high-level mode with a given rate is available.
rate = self.rates[mode][rate]
for mode in rate.values():
if port != "HDMI":
if mode not in self.readAvailableModes():
if mode not in availableModes:
return False
elif mode not in self.modes_preferred:
return False
Expand Down Expand Up @@ -329,8 +328,9 @@ def getFramebufferScale(self):

def getModeList(self, port): # Get a list with all modes, with all rates, for a given port.
results = []
availableModes = self.readAvailableModes()
for mode in self.modes[port]:
rates = [rate for rate in self.rates[mode] if self.isModeAvailable(port, mode, rate)] # List all rates which are completely valid.
rates = [rate for rate in self.rates[mode] if self.isModeAvailable(port, mode, rate, availableModes)] # List all rates which are completely valid.
if len(rates): # If at least one rate is OK then add this mode.
results.append((mode, rates))
return results
Expand Down Expand Up @@ -1461,7 +1461,8 @@ def hotplug(self, what):
port = config.av.videoport.value
mode = config.av.videomode[port].value
rate = config.av.videorate[mode].value
if not iAVSwitch.isModeAvailable(port, mode, rate):
availableModes = iAVSwitch.readAvailableModes()
if not iAVSwitch.isModeAvailable(port, mode, rate, availableModes):
print("[AVSwitch] VideoModeHoyplug: Mode for port '%s', mode '%s', rate '%s' went away." % (port, mode, rate))
modeList = iAVSwitch.getModeList(port)
if len(modeList):
Expand Down
19 changes: 6 additions & 13 deletions lib/python/Components/InputDevice.py
Expand Up @@ -9,6 +9,7 @@
from keyids import KEYIDS, KEYIDNAMES
from Components.config import ConfigSubsection, ConfigInteger, ConfigSelection, ConfigYesNo, ConfigText, ConfigSlider, config
from Components.Console import Console
from Components.International import international
from Components.SystemInfo import BoxInfo
from Tools.Directories import SCOPE_KEYMAPS, SCOPE_SKINS, fileReadLine, fileWriteLine, fileReadLines, fileReadXML, resolveFilename, pathExists

Expand Down Expand Up @@ -191,20 +192,12 @@ def getKeyboardMaplist(self):
return self.keyboardMaps

def getDefaultKeyboardMap(self):
# This is a code proposal to make the default keymap respond
# to the currently defined locale. OpenATV initialises the
# keymap based on hardware manufacturer. Making the
# selection based on language locale makes more sense. There
# are other code changes coming that will allow this to happen.
#
# locale = language.getLocale()
# if locale.startswith("de_") and "de.kmap" in self.keyboardMaps:
# return "de.kmap"
if BoxInfo.getItem("displaybrand") in ("Zgemma", "Atto.TV"):
return "us.kmap"
elif BoxInfo.getItem("displaybrand") == "Beyonwiz":
locale = international.getLocale()
if locale.startswith("de_"):
return "de.kmap"
elif locale.startswith("en_") and locale != "en_US":
return "eng.kmap"
return "de.kmap"
return "us.kmap"


class RemoteControl:
Expand Down
53 changes: 28 additions & 25 deletions lib/python/Components/Lcd.py
Expand Up @@ -37,8 +37,15 @@ def IconCheck(session=None, **kwargs):

class IconCheckPoller:
def __init__(self):
self.symbolNetwork = exists("/proc/stb/lcd/symbol_network")
self.symbolUsb = exists("/proc/stb/lcd/symbol_usb")
self.lcdMode = config.lcd.mode.value
config.lcd.mode.addNotifier(self.setLCDmode)
self.timer = eTimer()

def setLCDmode(self, configElement):
self.lcdMode = configElement.value

def start(self):
if self.iconcheck not in self.timer.callback:
self.timer.callback.append(self.iconcheck)
Expand All @@ -50,34 +57,30 @@ def stop(self):
self.timer.stop()

def iconcheck(self):
try:
threads.deferToThread(self.jobTask)
except:
pass
self.timer.startLongTimer(30)
threads.deferToThread(self.jobTask)

def jobTask(self):
linkState = 0
if exists("/sys/class/net/wlan0/operstate"):
linkState = fileReadLine("/sys/class/net/wlan0/operstate")
if linkState != "down":
linkState = fileReadLine("/sys/class/net/wlan0/carrier")
elif exists("/sys/class/net/eth0/operstate"):
linkState = fileReadLine("/sys/class/net/eth0/operstate")
if linkState != "down":
linkState = fileReadLine("/sys/class/net/eth0/carrier")
linkState = linkState[:1]
if exists("/proc/stb/lcd/symbol_network") and config.lcd.mode.value == "1":
if self.symbolNetwork and self.lcdMode:
linkState = "0"
if exists("/sys/class/net/wlan0/operstate"):
linkState = fileReadLine("/sys/class/net/wlan0/operstate")
if linkState != "down":
linkState = fileReadLine("/sys/class/net/wlan0/carrier")
elif exists("/sys/class/net/eth0/operstate"):
linkState = fileReadLine("/sys/class/net/eth0/operstate")
if linkState != "down":
linkState = fileReadLine("/sys/class/net/eth0/carrier")
fileWriteLine("/proc/stb/lcd/symbol_network", linkState)
elif exists("/proc/stb/lcd/symbol_network") and config.lcd.mode.value == "0":
fileWriteLine("/proc/stb/lcd/symbol_network", "0")
USBState = 0
for bus in busses():
devices = bus.devices
for dev in devices:
if dev.deviceClass != 9 and dev.deviceClass != 2 and dev.idVendor != 3034 and dev.idVendor > 0:
USBState = 1
if exists("/proc/stb/lcd/symbol_usb"):
if self.symbolUsb:
USBState = 0
try:
for bus in busses():
devices = bus.devices
for dev in devices:
if dev.deviceClass != 9 and dev.deviceClass != 2 and dev.idVendor != 3034 and dev.idVendor > 0:
USBState = 1
except Exception as err:
print("[IconCheckPoller] Error get USB devices! (%s)" % str(err))
fileWriteLine("/proc/stb/lcd/symbol_usb", USBState)
self.timer.startLongTimer(30)

Expand Down
7 changes: 6 additions & 1 deletion lib/python/Components/UsageConfig.py
Expand Up @@ -294,6 +294,11 @@ def alternativeNumberModeChange(configElement):
("3", _("2nd InfoBar ECM"))
])
config.usage.second_infobar_timeout = ConfigSelection(default="5", choices=choiceList)
config.usage.show_infobar_subservices = ConfigSelection(default=1, choices=[
(0, _("Off")),
(1, _("If EPG available")),
(2, _("Always"))
])

def showsecondinfobarChanged(configElement):
if config.usage.show_second_infobar.value != "INFOBAREPG":
Expand Down Expand Up @@ -1546,7 +1551,7 @@ def setZapmode(el):
languageChoiceList = [
("", _("None")),
("und", _("Undetermined")),
("orj dos ory org esl qaa und mis mul ORY ORJ Audio_ORJ oth", _("Original")),
("orj dos ory org esl qaa qaf und mis mul ORY ORJ Audio_ORJ oth", _("Original")),
("ara", _("Arabic")),
("eus baq", _("Basque")),
("bul", _("Bulgarian")),
Expand Down
11 changes: 5 additions & 6 deletions lib/python/RecordTimer.py
Expand Up @@ -151,7 +151,6 @@ def saveTimers(self):
timerEntry.append("rename_repeat=\"%s\"" % int(timer.rename_repeat))
timerEntry.append("name=\"%s\"" % stringToXML(timer.name))
timerEntry.append("description=\"%s\"" % stringToXML(timer.description))
timerEntry.append("state=\"%d\"" % timer.state)
if timer.dirname:
timerEntry.append("location=\"%s\"" % stringToXML(timer.dirname))
if timer.tags:
Expand All @@ -167,6 +166,8 @@ def saveTimers(self):
timerEntry.append("always_zap=\"%s\"" % int(timer.always_zap))
timerEntry.append("descramble=\"%s\"" % int(timer.descramble))
timerEntry.append("record_ecm=\"%s\"" % int(timer.record_ecm))
if timer.failed:
timerEntry.append("failed=\"1\"")
if timer.isAutoTimer:
# timerEntry.append("isAutoTimer=\"True\"")
timerEntry.append("isAutoTimer=\"1\"")
Expand Down Expand Up @@ -269,9 +270,7 @@ def createTimer(self, timerDom):
timer.vpsplugin_time = int(vpsTime)
for log in timerDom.findall("log"):
timer.log_entries.append((int(log.get("time")), int(log.get("code")), log.text.strip()))
state = int(timerDom.get("state") or "0")
if state:
timer.state = state
timer.failed = int(timerDom.get("failed") or "0")
return timer

def timeChanged(self, timer):
Expand Down Expand Up @@ -733,7 +732,7 @@ def activate(self):
self.start_prepare = int(time()) + 5 # tryPrepare in 5 seconds.
self.log(0, "Next try in 5 seconds. (%d/3)" % self.mountPathRetryCounter)
return False
message = _("Write error at start of recording. %s\n%s") % ((_("Disk was not found!"), _("Disk is not writable!"), _("Disk full?"))[self.mountPathErrorNumber - 1], self.name)
message = _("Write error at start of recording. %s\n%s") % ((_("Storage device not found!"), _("Storage device not writable!"), _("Storage device full!"))[self.mountPathErrorNumber - 1], self.name)
if InfoBar and InfoBar.instance:
InfoBar.instance.openInfoBarMessage(message, MessageBox.TYPE_ERROR, timeout=20)
else:
Expand Down Expand Up @@ -1367,7 +1366,7 @@ def gotRecordEvent(self, record, event):
print("[RecordTimer] Write error while recording, %s" % msg)
# Show notification. The 'id' will make sure that it will be displayed only once, even if
# more timers are failing at the same time which is very likely in case of disk full.
AddPopup(text=_("Write error while recording. %s") % (_("An unknown error occurred!"), _("Disk was not found!"), _("Disk is not writable!"), _("Disk full?"))[err], type=MessageBox.TYPE_ERROR, timeout=0, id="DiskFullMessage")
AddPopup(text=_("Write error while recording. %s") % (_("An unknown error occurred!"), _("Storage device not found!"), _("Storage device not writable!"), _("Storage device full!"))[err], type=MessageBox.TYPE_ERROR, timeout=0, id="DiskFullMessage")
# Okay, the recording has been stopped. We need to properly note that in our
# state, with also keeping the possibility to re-try.
# DEBUG: This has to be done!
Expand Down
12 changes: 9 additions & 3 deletions lib/python/Screens/ChannelSelection.py
Expand Up @@ -1010,6 +1010,8 @@ def getServiceName(serviceReference):
return _("Reception Lists")
if "ORDER BY name" in servicePath:
return _("All Services")
elif serviceName == "favourites" and not config.usage.multibouquet.value: # Translate single bouquet favourites
return _("Favorites")
return serviceName

mode = _("TV") if self.mode == MODE_TV else _("Radio")
Expand All @@ -1029,8 +1031,8 @@ def getServiceName(serviceReference):
EDIT_PIP: _("PiP")
}.get(self.function)
functionType = " [%s]" % functionType if functionType else ""
# self.setTitle("%s: %s%s" % (mode, title, functionType))
self.setTitle("%s (%s)%s" % (title, mode, functionType))
self.setTitle("%s - %s%s" % (mode, title, functionType))
#self.setTitle("%s (%s)%s" % (title, mode, functionType))
print("[ChannelSelection] buildTitle DEBUG: Setting title='%s'." % self.getTitle())

def getServiceName(self, serviceReference):
Expand Down Expand Up @@ -1085,7 +1087,7 @@ def enterPath(self, ref, justSet=False):
def getBouquetNumOffset(self, bouquet):
if not config.usage.multibouquet.value:
return 0
str = bouquet.toString()
bStr = bouquet.toString() # TODO Do we need this?
offset = 0
if "userbouquet." in bouquet.toCompareString():
serviceHandler = eServiceCenter.getInstance()
Expand Down Expand Up @@ -2602,6 +2604,10 @@ def cancel(self):
lastservice = eServiceReference(self.lastservice.value)
if lastservice.valid() and self.getCurrentSelection() != lastservice:
self.setCurrentSelection(lastservice)
elif self.revertMode == MODE_TV and self.mode == MODE_RADIO:
self.setModeTv()
elif self.revertMode == MODE_RADIO and self.mode == MODE_TV:
self.setModeRadio()
self.asciiOff()
if config.usage.servicelistpreview_mode.value:
self.zapBack()
Expand Down

0 comments on commit 0cf8210

Please sign in to comment.