Skip to content

Commit

Permalink
Merge pull request #835 from MrServo/master
Browse files Browse the repository at this point in the history
[LCD4linux] v5.0-r25 tiny bugfix in 'resetBrightness'
  • Loading branch information
jbleyel authored Feb 3, 2025
2 parents 33591ff + 2816e95 commit 525914a
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 77 deletions.
7 changes: 5 additions & 2 deletions LCD4linux/src/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ def setScreen(self, S, Lcd="", Hold=False):
L4Lelement.Refresh = True

def resetBrightness(self, AKT=[]):
L4Lelement.BrightAkt = AKT if len(AKT) == 3 else [-1, -1, -1]
if len(AKT) == 3:
L4Lelement.BrightAkt = AKT
else:
L4Lelement.Bright = [-1, -1, -1]

def setBrightness(self, LCD, BRI=-1):
if int(LCD) > 0 and int(LCD) < 4:
Expand All @@ -119,7 +122,7 @@ def setBrightness(self, LCD, BRI=-1):

def getBrightness(self, LCD=0, ORG=True):
if int(LCD) > 0 and int(LCD) < 4:
return L4Lelement.Bright[int(LCD) - 1] if ORG == False else L4Lelement.BrightAkt[int(LCD) - 1]
return [L4Lelement.Bright[int(LCD) - 1]] if ORG == False else [L4Lelement.BrightAkt[int(LCD) - 1]]
else:
return L4Lelement.Bright if ORG == False else L4Lelement.BrightAkt

Expand Down
10 changes: 5 additions & 5 deletions LCD4linux/src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2698,13 +2698,13 @@ def getFB2(check):


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


def virtBRI(LCD):
global AktNight
vb = BRI(L4LElist.getBrightness(LCD), LCD)
vb = BRI(L4LElist.getBrightness(LCD)[0], LCD)
if vb < 1:
return 0
elif vb == 10:
Expand Down Expand Up @@ -5103,11 +5103,11 @@ def MailDecode(Sdecode):
Date = ""
for R in mailserver.retr(M)[1]:
if str(R).upper().startswith("FROM:"):
From = R[R.find(" "):].strip()
From = R[str(R).find(" "):].strip()
elif str(R).upper().startswith("SUBJECT:"):
Subj = R[R.find(" "):].strip()
Subj = R[str(R).find(" "):].strip()
elif str(R).upper().startswith("DATE:") and LCD4linux.MailShowDate.value == True:
Date = R[R.find(" "):].strip()
Date = R[str(R).find(" "):].strip()
Date = "- %s" % str(Date).split("+")[0].split(",")[-1].strip()
if From != "" and Subj != "":
break
Expand Down
Binary file added TVSpielfilm/src/pics/FHD/icons/left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added TVSpielfilm/src/pics/FHD/icons/right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added TVSpielfilm/src/pics/HD/icons/left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added TVSpielfilm/src/pics/HD/icons/right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
181 changes: 111 additions & 70 deletions TVSpielfilm/src/plugin.py

Large diffs are not rendered by default.

0 comments on commit 525914a

Please sign in to comment.