Skip to content

Commit

Permalink
plugin.py: Synch with OE-A plugins
Browse files Browse the repository at this point in the history
-Some small changes were slipped through during cherry-picking.
-Restore some code now we both have BoxInfo.
  • Loading branch information
Hains committed Aug 13, 2024
1 parent f678ce7 commit 44f422d
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions lcd4linux/src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@
if find_library("usb-0.1") is not None or find_library("usb-1.0") is not None:
print("[LCD4linux] libusb found :-)", getEnigmaVersionString())
USBok = True
elif ARCH in ("aarch64"):
get_backend(find_library=lambda x: "/lib64/libusb-1.0.so.0")
print("[LCD4linux] libusb found :-)", getEnigmaVersionString())
USBok = True
Version = "V5.0-r22"
L4LElist = L4Lelement()
L4LdoThread = True
Expand Down Expand Up @@ -2656,7 +2660,7 @@ def getFB2(check):

def BRI(w1, w2):
gb = L4LElist.getBrightness(w2, False)
return int(w1) if gb == -1 else gb
return w1 if gb == -1 else gb


def virtBRI(LCD):
Expand Down Expand Up @@ -10313,7 +10317,7 @@ def getNumber(actservice):
service = servicelist.getNext()
if not service.valid(): # check end of list
break
playable = not (service.flags & mask) or (service.flags & eServiceReference.isNumberedMarker)
playable = not (service.flags & mask)
if playable:
number += 1
# L4logE(" ",service.getPath())
Expand Down Expand Up @@ -15288,7 +15292,7 @@ def Lput4(LCD, SCR, FUNC, PARA):
if "2" in LCD4linux.PopupLCD.value and LCD4linux.LCDType2.value != "00":
Brief2.put([putPopup, Para, 2, 2])
if "3" in LCD4linux.PopupLCD.value and LCD4linux.LCDType3.value != "00":
Brief3.put([putPopup, Para, 3, 3])
Brief2.put([putPopup, Para, 3, 3])
# show isCrashlog
if LCD4linux.Crash.value == True:
Brief1.put([putCrash, 1, 1])
Expand Down Expand Up @@ -15463,7 +15467,15 @@ def autostart(reason, **kwargs):


def setup(menuid, **kwargs):
return [("LCD4Linux", main, "lcd4linux", None)] if menuid == "setup" else []
if IMAGEDISTRO in ("openvix", "openatv", "egami", "openhdf", "openbh", "openspa", "opendroid"):
if menuid == "display" and SystemInfo["Display"]:
return [("LCD4Linux", main, "lcd4linux", None)]
elif menuid == "system" and not SystemInfo["Display"]:
return [("LCD4Linux", main, "lcd4linux", None)]
else:
return []
else:
return [("LCD4Linux", main, "lcd4linux", None)] if menuid == "setup" else []


def Plugins(**kwargs):
Expand Down

0 comments on commit 44f422d

Please sign in to comment.