Skip to content

Commit 44c42cc

Browse files
MrServoHains
authored andcommitted
[LCD4linux] V5.0-r29 tiny modification on users request
- remove message 'no LCD2 picture file' when LCD2 is turned 'off' details see: www.opena.tv/viewtopic.php?t=73&start=3480#p588124
1 parent f086ac3 commit 44c42cc

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

lcd4linux/src/plugin.py

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
if find_library("usb-0.1") is not None or find_library("usb-1.0") is not None:
173173
print("[LCD4linux] libusb found :-)", getEnigmaVersionString())
174174
USBok = True
175-
Version = "V5.0-r28"
175+
Version = "V5.0-r29"
176176
L4LElist = L4Lelement()
177177
L4LdoThread = True
178178
LCD4enigma2config = resolveFilename(SCOPE_CONFIG) # /etc/enigma2/
@@ -5601,31 +5601,32 @@ def showpic(self):
56015601
self["LCD1"].hide()
56025602
else:
56035603
self["LCD1text"].setText("")
5604-
ff = False
5605-
fn = "%s.jpg" % PIC2
5606-
try:
5607-
if isfile(fn):
5608-
ft = stat(fn).st_mtime
5609-
ff = True
5610-
if ft != self.mtime2:
5611-
self.picload2.startDecode(fn)
5612-
self.mtime2 = ft
5613-
else:
5614-
fn = "%s.png" % PIC2
5615-
ft = 0.0
5604+
if LCD4linux.LCDType2.value != "00":
5605+
ff = False
5606+
fn = "%s.jpg" % PIC2
5607+
try:
56165608
if isfile(fn):
56175609
ft = stat(fn).st_mtime
56185610
ff = True
56195611
if ft != self.mtime2:
56205612
self.picload2.startDecode(fn)
56215613
self.mtime2 = ft
5622-
except Exception:
5623-
L4log("Error Pic2 not found")
5624-
if ff == False:
5625-
self["LCD2text"].setText(_("no LCD2 Picture-File"))
5626-
self["LCD2"].hide()
5627-
else:
5628-
self["LCD2text"].setText("")
5614+
else:
5615+
fn = "%s.png" % PIC2
5616+
ft = 0.0
5617+
if isfile(fn):
5618+
ft = stat(fn).st_mtime
5619+
ff = True
5620+
if ft != self.mtime2:
5621+
self.picload2.startDecode(fn)
5622+
self.mtime2 = ft
5623+
except Exception:
5624+
L4log("Error Pic2 not found")
5625+
if ff is False:
5626+
self["LCD2text"].setText(_("no LCD2 Picture-File"))
5627+
self["LCD2"].hide()
5628+
else:
5629+
self["LCD2text"].setText("")
56295630
if LCD4linux.LCDType3.value != "00":
56305631
ff = False
56315632
fn = "%s.jpg" % PIC3

0 commit comments

Comments
 (0)