Skip to content

Commit

Permalink
Add in about component getEnigmaBranchString so we can get it properly
Browse files Browse the repository at this point in the history
1. Still an improvement could be to really swig the BranchString as at
   this moment only a full version string is swigged that includes the
   date and the branch.
2. Also stop swapping the release and release version as I have no idea
   why the release version and release were swapped
3. In e.g. OpenWebif the enigma2 version string is currently not in line
   with what we see on the about screen. When this does harm we could
   consider to put the '()' back into the about component
  • Loading branch information
Littlesat committed Jan 6, 2025
1 parent 9ae34f6 commit 0cd341a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 6 additions & 0 deletions lib/python/Components/About.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ def getEnigmaVersionString():
return enigma_version


#maybe in future it is better to swig the branch string - for now I retrieve it from the VersionString
def getEnigmaBranchString():
import enigma
return enigma.getEnigmaVersionString()[11:]


def getGStreamerVersionString():
try:
from glob import glob
Expand Down
10 changes: 2 additions & 8 deletions lib/python/Screens/About.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,8 @@ def __init__(self, session):
# [WanWizard] Removed until we find a reliable way to determine the installation date
# AboutText += _("Installed: ") + about.getFlashDateString() + "\n"

# get enigma version, and put the release version in front
EnigmaVersion = about.getEnigmaVersionString()
EnigmaVersion = EnigmaVersion.rsplit("-", EnigmaVersion.count("-") - 2)
if len(EnigmaVersion) == 3:
EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[2] + "-" + EnigmaVersion[1] + ")"
else:
EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[1] + ")"
EnigmaVersion = _("Enigma version: ") + EnigmaVersion
EnigmaVersion = "%s%s (%s)" % (_("Enigma version: "), EnigmaVersion[:10], EnigmaVersion[11:])
self["EnigmaVersion"] = StaticText(EnigmaVersion)
AboutText += "\n" + EnigmaVersion + "\n"

Expand Down Expand Up @@ -223,7 +217,7 @@ def __init__(self, session):

# get the branch to display from the Enigma version
try:
branch = "?sha=" + about.getEnigmaVersionString()[11:]
branch = f"?sha={about.getEnigmaBranchString()}"
except:
branch = ""
branch_e2plugins = "?sha=python3"
Expand Down

0 comments on commit 0cd341a

Please sign in to comment.