Skip to content

Commit f8668c2

Browse files
MrServoHains
authored andcommitted
[LCD4linux] V5.0-r36 photoframe "Samsung SPF-1000W 1024x768" added
- improvement: added support for photoframe "SPF-1000W" - reveted some AUTOPEP8 corrections (mainly commentary lines) THX to User **KenTucky @ OpenA.TV** details see: www.opena.tv/viewtopic.php?p=591144#p591139 HINT: **LCD4linux** is still working under Python2 and Python3
1 parent 033c4af commit f8668c2

File tree

2 files changed

+27
-23
lines changed

2 files changed

+27
-23
lines changed

lcd4linux/src/Photoframe.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ def get_known_devices():
8686
dlist.append({'name': "SPF800W Mini Monitor", 'idVendor': 0x04e8, 'idProduct': 0x204c, 'width': 800, 'height': 600})
8787
dlist.append({'name': "SPF800W Mass Storage", 'idVendor': 0x04e8, 'idProduct': 0x204b})
8888

89+
# 28,29 Samsung SPF-1000W (217)
90+
dlist.append({'name': "SPF1000W Mini Monitor", 'idVendor': 0x04e8, 'idProduct': 0x204e, 'width': 1024, 'height': 768})
91+
dlist.append({'name': "SPF1000W Mass Storage", 'idVendor': 0x04e8, 'idProduct': 0x204d})
92+
8993
# Amazon Fire 7 (9th Generation 2019)
9094
dlist.append({'name': "Amazon Fire 7 Mini Monitor", 'idVendor': 0x1949, 'idProduct': 0x03C3, 'width': 1024, 'height': 600})
9195
dlist.append({'name': "Amazon Fire 7 Mass Storage", 'idVendor': 0x1949, 'idProduct': 0x03C1})

lcd4linux/src/plugin.py

Lines changed: 23 additions & 23 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-r35"
175+
Version = "V5.0-r36"
176176
L4LElist = L4Lelement()
177177
L4LdoThread = True
178178
LCD4enigma2config = resolveFilename(SCOPE_CONFIG) # /etc/enigma2/
@@ -314,7 +314,7 @@
314314
("11", _("Pearl (or compatible LCD) 320x240")), ("12", _("Pearl (or compatible LCD) 240x320")), ("121", _("Corby@Pearl 128x128")), ("122", _("AX206 (or compatible LCD) 480x320")), ("123", _("AX206 (or compatible LCD) 800x480")),
315315
("210", _("Samsung SPF-72H 800x480")), ("23", _("Samsung SPF-75H/76H 800x480")), ("24", _("Samsung SPF-87H 800x480")), ("25", _("Samsung SPF-87H old 800x480")), ("26", _("Samsung SPF-83H 800x600")),
316316
("29", _("Samsung SPF-85H/86H 800x600")), ("212", _("Samsung SPF-85P/86P 800x600")), ("28", _("Samsung SPF-105P 1024x600")), ("27", _("Samsung SPF-107H 1024x600")), ("213", _("Samsung SPF-107H old 1024x600")),
317-
("211", _("Samsung SPF-700T 800x600")), ("215", _("Samsung SPF-800P 800x480")), ("214", _("Samsung SPF-1000P 1024x600")), ("216", _("Samsung SPF-800W 800x600")), ("430", _("Internal TFT-LCD 400x240")), ("50", _("Internal Box-Skin-LCD")),
317+
("211", _("Samsung SPF-700T 800x600")), ("215", _("Samsung SPF-800P 800x480")), ("214", _("Samsung SPF-1000P 1024x600")), ("216", _("Samsung SPF-800W 800x600")), ("217", _("Samsung SPF-1000W 1024x768")), ("430", _("Internal TFT-LCD 400x240")), ("50", _("Internal Box-Skin-LCD")),
318318
("31", _("only Picture 320x240")), ("33", _("only Picture 800x480")), ("36", _("only Picture 800x600")), ("37", _("only Picture 1024x600")), ("320", _("only Picture Custom Size")), ("420", _("only Picture Custom Size 2"))
319319
]
320320
if PNGutilOK:
@@ -2897,7 +2897,7 @@ def getResolution(t, r):
28972897
elif t[1:] in ["7", "8", "13", "14"]:
28982898
MAX_W, MAX_H = 1024, 600
28992899
elif t[1:] == "17":
2900-
MAX_W, MAX_H = 220, 176
2900+
MAX_W, MAX_H = 1024, 768
29012901
elif t[1:] == "18":
29022902
MAX_W, MAX_H = 255, 64
29032903
elif t[1:] == "22":
@@ -5151,7 +5151,7 @@ def MailDecode(Sdecode):
51515151
try:
51525152
if mailserver is not None:
51535153
mailserver.select("inbox")
5154-
# typ, data = mailserver.search(None, '(SINCE "{date}")'.format(date=Date))
5154+
# typ, data = mailserver.search(None, '(SINCE "{date}")'.format(date=Date))
51555155
if str(LCD4linux.MailIMAPDays.value) == "0":
51565156
typ, data = mailserver.search(None, 'ALL')
51575157
else:
@@ -5745,8 +5745,8 @@ def SetList(self):
57455745
self.list1.append(getConfigListEntry(_("- Color"), LCD4linux.PopupColor))
57465746
self.list1.append(getConfigListEntry(_("- Background Color"), LCD4linux.PopupBackColor))
57475747
self.list1.append(getConfigListEntry(_("- Font"), LCD4linux.PopupFont))
5748-
# if LCD4linux.LCDType1.value[0] == "4" or LCD4linux.LCDType2.value[0] == "4":
5749-
# self.list1.append(getConfigListEntry(_("Internal TFT Active"), LCD4linux.LCDTFT))
5748+
# if LCD4linux.LCDType1.value[0] == "4" or LCD4linux.LCDType2.value[0] == "4":
5749+
# self.list1.append(getConfigListEntry(_("Internal TFT Active"), LCD4linux.LCDTFT))
57505750
self.list1.append(getConfigListEntry(_("Active Screen"), LCD4linux.ScreenActive))
57515751
self.list1.append(getConfigListEntry(_("Screen Switch Select - Screen"), LCD4linux.ScreenSwitch))
57525752
self.list1.append(getConfigListEntry(_("Screen Default after mode change - Screen"), LCD4linux.ScreenDefault))
@@ -5766,9 +5766,9 @@ def SetList(self):
57665766
self.list1.append(getConfigListEntry(_("Picture Sort"), LCD4linux.BilderSort))
57675767
self.list1.append(getConfigListEntry(_("Picture Directory Recursive"), LCD4linux.BilderRecursiv))
57685768
self.list1.append(getConfigListEntry(_("Picture Quality for Resizing"), LCD4linux.BilderQuality))
5769-
# self.list1.append(getConfigListEntry(_("Picture JPEG-Quality [%]"), LCD4linux.BilderJPEG))
5769+
# self.list1.append(getConfigListEntry(_("Picture JPEG-Quality [%]"), LCD4linux.BilderJPEG))
57705770
self.list1.append(getConfigListEntry(_("Picture Quick Update Time [s]"), LCD4linux.BilderQuick))
5771-
# self.list1.append(getConfigListEntry(_("Picture Quick JPEG-Quality [%]"), LCD4linux.BilderJPEGQuick))
5771+
# self.list1.append(getConfigListEntry(_("Picture Quick JPEG-Quality [%]"), LCD4linux.BilderJPEGQuick))
57725772
self.list1.append(getConfigListEntry(_("Picture Type [only Picture]"), LCD4linux.BilderTyp))
57735773
self.list1.append(getConfigListEntry(_("Background-Picture Type"), LCD4linux.BilderBackground))
57745774
self.list1.append(getConfigListEntry(_("Weather API"), LCD4linux.WetterApi))
@@ -5899,7 +5899,7 @@ def SetList(self):
58995899
self.list1.append(getConfigListEntry(_("MJPEG Stream LCD 3 enable"), LCD4linux.MJPEGenable3))
59005900
self.list1.append(getConfigListEntry(_("MJPEG Stream LCD 3 Port"), LCD4linux.MJPEGport3))
59015901
self.list1.append(getConfigListEntry(_("MJPEG Stream LCD 3 Virtual Brightness"), LCD4linux.MJPEGvirtbri3))
5902-
# self.list1.append(getConfigListEntry(_("MJPEG Boundary Mode"), LCD4linux.MJPEGMode))
5902+
# self.list1.append(getConfigListEntry(_("MJPEG Boundary Mode"), LCD4linux.MJPEGMode))
59035903
self.list1.append(getConfigListEntry(_("MJPEG Cycle"), LCD4linux.MJPEGCycle))
59045904
self.list1.append(getConfigListEntry(_("MJPEG Restart on Error"), LCD4linux.MJPEGRestart))
59055905
self.list1.append(getConfigListEntry(_("MJPEG Header Mode"), LCD4linux.MJPEGHeader))
@@ -8013,8 +8013,8 @@ def fileSelected(self, dir, dir1):
80138013
LCD4linux.MPTextFile.value = dirdir
80148014
elif sel == LCD4linux.MPCoverFile:
80158015
LCD4linux.MPCoverFile.value = dirdir
8016-
# elif sel == LCD4linux.MPCoverFile2:
8017-
# LCD4linux.MPCoverFile2.value = dirdir
8016+
# elif sel == LCD4linux.MPCoverFile2:
8017+
# LCD4linux.MPCoverFile2.value = dirdir
80188018
elif sel == LCD4linux.BildFile:
80198019
LCD4linux.BildFile.value = dirdir
80208020
elif sel == LCD4linux.Bild2File:
@@ -8494,7 +8494,7 @@ def __init__(self, session):
84948494
self.ExternalIP = getExternalIP()
84958495
self.timerlist = ""
84968496
self.pluginlist = ""
8497-
# self.onShow.append(self.ServiceChange)
8497+
# self.onShow.append(self.ServiceChange)
84988498
config.misc.standbyCounter.addNotifier(self.standbyQuery, initial_call=False)
84998499
getBilder()
85008500
self.Temp = GetTempSensor()
@@ -8624,10 +8624,10 @@ def getSonos(self):
86248624
return
86258625
if self.SonosSoCo is not None:
86268626
cti = self.SonosSoCo.get_current_transport_info()
8627-
# if LCD4linux.SonosON.value == True:
8628-
# cti = {u'current_transport_status': 'OK', u'current_transport_state': 'PLAYING', u'current_transport_speed': '1'}
8629-
# else:
8630-
# cti = {u'current_transport_status': 'OK', u'current_transport_state': 'STOPPED', u'current_transport_speed': '1'}
8627+
# if LCD4linux.SonosON.value == True:
8628+
# cti = {u'current_transport_status': 'OK', u'current_transport_state': 'PLAYING', u'current_transport_speed': '1'}
8629+
# else:
8630+
# cti = {u'current_transport_status': 'OK', u'current_transport_state': 'STOPPED', u'current_transport_speed': '1'}
86318631
self.SonosInfo = cti.get("current_transport_state", "STOPPED")
86328632
if self.SonosInfo != "PLAYING" or self.SonosSoCo.is_playing_tv:
86338633
if self.SonosRunning:
@@ -8640,7 +8640,7 @@ def getSonos(self):
86408640
else:
86418641
self.SonosTrack = self.SonosSoCo.get_current_track_info()
86428642
self.Lvol = self.SonosSoCo.volume
8643-
# self.SonosTrack = {u'album': 'Sehnsucht', u'artist': 'Rammstein', u'title': 'Eifersucht', u'uri': 'x-sonos-spotify:spotify%3atrack%3a4Ugp6Wu4hVXnbEKT3Nrka0?sid=9&flags=8224&sn=3', u'playlist_position': '10', u'duration': '0:03:35', u'position': '0:01:39', u'album_art': u'http://192.168.0.84:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a4Ugp6Wu4hVXnbEKT3Nrka0%3fsid%3d9%26flags%3d8224%26sn%3d3', u'metadata': '<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><item id="-1" parentID="-1" restricted="true"><res protocolInfo="sonos.com-spotify:*:audio/x-spotify:*" duration="0:03:35">x-sonos-spotify:spotify%3atrack%3a4Ugp6Wu4hVXnbEKT3Nrka0?sid=9&amp;flags=8224&amp;sn=3</res><r:streamContent></r:streamContent><upnp:albumArtURI>/getaa?s=1&amp;u=x-sonos-spotify%3aspotify%253atrack%253a4Ugp6Wu4hVXnbEKT3Nrka0%3fsid%3d9%26flags%3d8224%26sn%3d3</upnp:albumArtURI><dc:title>Eifersucht</dc:title><upnp:class>object.item.audioItem.musicTrack</upnp:class><dc:creator>Rammstein</dc:creator><upnp:album>Sehnsucht</upnp:album></item></DIDL-Lite>'}
8643+
# self.SonosTrack = {u'album': 'Sehnsucht', u'artist': 'Rammstein', u'title': 'Eifersucht', u'uri': 'x-sonos-spotify:spotify%3atrack%3a4Ugp6Wu4hVXnbEKT3Nrka0?sid=9&flags=8224&sn=3', u'playlist_position': '10', u'duration': '0:03:35', u'position': '0:01:39', u'album_art': u'http://192.168.0.84:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a4Ugp6Wu4hVXnbEKT3Nrka0%3fsid%3d9%26flags%3d8224%26sn%3d3', u'metadata': '<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><item id="-1" parentID="-1" restricted="true"><res protocolInfo="sonos.com-spotify:*:audio/x-spotify:*" duration="0:03:35">x-sonos-spotify:spotify%3atrack%3a4Ugp6Wu4hVXnbEKT3Nrka0?sid=9&amp;flags=8224&amp;sn=3</res><r:streamContent></r:streamContent><upnp:albumArtURI>/getaa?s=1&amp;u=x-sonos-spotify%3aspotify%253atrack%253a4Ugp6Wu4hVXnbEKT3Nrka0%3fsid%3d9%26flags%3d8224%26sn%3d3</upnp:albumArtURI><dc:title>Eifersucht</dc:title><upnp:class>object.item.audioItem.musicTrack</upnp:class><dc:creator>Rammstein</dc:creator><upnp:album>Sehnsucht</upnp:album></item></DIDL-Lite>'}
86448644
if self.SonosRunning is False:
86458645
self.SonosSoCo = None
86468646
self.SonosRunning = True
@@ -10394,7 +10394,7 @@ def getNumber(actservice): # actservice must be an instance of eServiceReferenc
1039410394
playable = not (service.flags & mask)
1039510395
if playable:
1039610396
number += 1
10397-
# L4logE(" ",service.getPath())
10397+
# L4logE(" ",service.getPath())
1039810398
if actbouquet:
1039910399
if actbouquet == bouquet and actservice == service:
1040010400
return number
@@ -12327,7 +12327,7 @@ def putProgress(workaround, draw, im):
1232712327
else:
1232812328
ms = 1
1232912329
font = ImageFont.truetype(ConfigFont, int(ConfigSize * ms) + 8, encoding='unic') # 5
12330-
# if self.Lpath and ":0:" not in self.Lpath and "//" not in self.Lpath: # Movie
12330+
# if self.Lpath and ":0:" not in self.Lpath and "//" not in self.Lpath: # Movie
1233112331
if self.Llength is not None and self.Llength[0] != -1:
1233212332
isVideoPlaying = 1
1233312333
try:
@@ -13916,7 +13916,7 @@ def getColor(c):
1391613916
if ConfigModule == "0":
1391713917
ConfigModule = ConfigModuleUser
1391813918
font = ImageFont.truetype(ConfigFont, ConfigSize, encoding='unic')
13919-
# font1 = ImageFont.truetype(ConfigFont, int(ConfigSize / 1.5), encoding='unic')
13919+
# font1 = ImageFont.truetype(ConfigFont, int(ConfigSize / 1.5), encoding='unic')
1392013920
font2 = ImageFont.truetype(ConfigFont, int(ConfigSize / 2), encoding='unic')
1392113921
font3 = ImageFont.truetype(ConfigFont, int(ConfigSize / 3), encoding='unic')
1392213922
font4 = ImageFont.truetype(ConfigFont, int(ConfigSize / 5), encoding='unic')
@@ -14464,7 +14464,7 @@ def Sync(L):
1446414464
L4Lkeys = sorted(L4LElist.get().keys())
1446514465
for E in L4Lkeys:
1446614466
CUR = L4LElist.get(E)
14467-
# L4logE("CUR: %s Active %s" % (CUR,ScreenActive[0]))
14467+
# L4logE("CUR: %s Active %s" % (CUR,ScreenActive[0]))
1446814468
LCD = str(CUR.get("Lcd", "1"))
1446914469
if getSA(int(LCD)) in str(CUR.get("Screen", "1")) and MODE in CUR.get("Mode", "On"):
1447014470
Typ = CUR.get("Typ", None)
@@ -14545,7 +14545,7 @@ def Lput4(LCD, SCR, FUNC, PARA):
1454514545
if not LCD4linux.Enable.value:
1454614546
return
1454714547
tt = time()
14548-
# L4logE("MP-Mode", isMediaPlayer)
14548+
# L4logE("MP-Mode", isMediaPlayer)
1454914549
L4log("creating LCD-Picture: %s" % ScreenActive)
1455014550
if isdir("%slcd4linux" % TMP) == False:
1455114551
try:
@@ -14573,7 +14573,7 @@ def Lput4(LCD, SCR, FUNC, PARA):
1457314573
self.SaveisMediaPlayer = isMediaPlayer
1457414574
isMediaPlayer = ""
1457514575
rmFile(MP3tmp)
14576-
# rmFile(GoogleCover)
14576+
# rmFile(GoogleCover)
1457714577
if self.SonosRunning:
1457814578
isMediaPlayer, logtext = ("sonos", "detected Sonos")
1457914579
elif self.YMCastRunning:

0 commit comments

Comments
 (0)