172172if 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- elif ARCH in ("aarch64"):
176- get_backend(find_library=lambda x: "/lib64/libusb-1.0.so.0")
177- print("[LCD4linux] libusb found :-)", getEnigmaVersionString())
178- USBok = True
179- Version = "V5.0-r25"
175+ Version = "V5.0-r27"
180176L4LElist = L4Lelement()
181177L4LdoThread = True
182178LCD4enigma2config = resolveFilename(SCOPE_CONFIG) # /etc/enigma2/
233229OSDdontshow = ["LCD4linux Settings", "Virtual Zap", "InfoBar", "Infobar", "SecondInfoBar", "FanControl2", "Mute", "LCD Text", "UnhandledKey", "QuickZap", "Volume", "PVRState"]
234230OSDdontskin = ["LCDdisplayFile", "VirtualZap", "InfoBar", "Infobar", "InfoBarSummary", "PictureInPicture", "SimpleSummary", "ScreenSummary", "TimeshiftState", "InfoScreen", "Standby", "EMCMediaCenter", "InfoBarMoviePlayerSummary", "PVRState", "ResolutionLabel", "WidgetBackground", "camodogFSScreen2", "camodogFSmini"]
235231wwwWetter = ["", ""]
236- WetterType = ["", ""]
237- WetterZoom = [0, 0]
232+ WetterType = ""
233+ WetterZoom = 0
238234OldTemp_c = -88
239235OldFeel = -88
240236OldHum = -88
17451741LCD4linux.MPCover = ConfigSelection(choices=ScreenSelect, default="0")
17461742LCD4linux.MPCoverLCD = ConfigSelection(choices=LCDSelect, default="1")
17471743LCD4linux.MPCoverPath1 = ConfigText(default="/tmp", fixed_size=False, visible_width=50)
1748- LCD4linux.MPCoverPath2 = ConfigText(default="/tmp ", fixed_size=False, visible_width=50)
1744+ LCD4linux.MPCoverPath2 = ConfigText(default="/media/hdd/movie/ ", fixed_size=False, visible_width=50)
17491745LCD4linux.MPCoverFile = ConfigText(default="/tmp/lcd4linux.jpg", fixed_size=False, visible_width=50)
17501746LCD4linux.MPCoverFile2 = ConfigText(default="/tmp/lcd4linux.jpg", fixed_size=False, visible_width=50)
17511747LCD4linux.MPCoverSize = ConfigSlider(default=240, increment=10, limits=(10, 1024))
@@ -9821,17 +9817,17 @@ def downloadWetter(self, ort, wetter):
98219817 lang = "&lang=%s" % ort.split(".")[0] if "." in ort else ""
98229818 city = LCD4linux.WetterCity.value if wetter == 0 else LCD4linux.Wetter2City.value
98239819 if "." in city: # e.g. 'de.ZIPccode'
9824- self. feedurl = "http://api.weatherunlocked.com/api/current/%s%s%s " % ( city, apkey, lang)
9820+ feedurl = "http://api.weatherunlocked.com/api/current/%s" % city
98259821 else:
9826- self. feedurl = "http://api.weatherunlocked.com/api/current/%s,%s%s%s " % (self.Long[wetter], self.Lat[wetter], apkey, lang )
9827- L4logE("WU-getcurrentweather%s: %s" % (wetter, self. feedurl))
9828- callInThread(getPage, self. feedurl, boundFunction(self.downloadWUcallback, wetter), self.downloadListError)
9829- if "." in city : # e.g. 'de.ZIPcode'
9830- self. feedurl = "http://api.weatherunlocked.com/api/forecast/%s%s%s " % ( city, apkey, lang)
9822+ feedurl = "http://api.weatherunlocked.com/api/current/%s,%s" % (self.Long[wetter], self.Lat[wetter])
9823+ L4logE("WU-getcurrentweather%s: %s" % (wetter, feedurl))
9824+ callInThread(boundFunction( getPage, feedurl, params=params) , boundFunction(self.downloadWUcallback, wetter), self.downloadListError)
9825+ if "." in ort : # e.g. 'de.ZIPcode'
9826+ feedurl = "http://api.weatherunlocked.com/api/forecast/%s" % city
98319827 else:
9832- self. feedurl = "http://api.weatherunlocked.com/api/forecast/%s,%s%s%s " % (self.Long[wetter], self.Lat[wetter], apkey, lang )
9833- L4logE("WU-getforecastweather%s: %s" % (wetter, self. feedurl))
9834- callInThread(getPage, self. feedurl, boundFunction(self.downloadWUcallback, wetter), self.downloadListError)
9828+ feedurl = "http://api.weatherunlocked.com/api/forecast/%s,%s" % (self.Long[wetter], self.Lat[wetter])
9829+ L4logE("WU-getforecastweather%s: %s" % (wetter, feedurl))
9830+ callInThread(boundFunction( getPage, feedurl, params=params) , boundFunction(self.downloadWUcallback, wetter), self.downloadListError)
98359831 L4log("Wetter%s: downloadstart %s:%s %s %s" % (wetter, LCD4linux.WetterApi.value, ort, language.getLanguage(), la))
98369832 else:
98379833 if self.NetworkConnectionAvailable is not None:
@@ -10596,8 +10592,7 @@ def MoonPosition(now=None):
1059610592
1059710593
1059810594def MoonPhase(pos):
10599- index = (pos * float(8)) + float("0.5")
10600- index = floor(index)
10595+ index = int(floor(pos * 8 + 0.5))
1060110596 return {
1060210597 0: _("New Moon"),
1060310598 1: _("First Quarter"),
@@ -11015,8 +11010,8 @@ def putWetter(workaround, draw, im):
1101511010 UseWetterPath = WetterPath
1101611011 if len(LCD4linux.WetterPath.value) > 2 and isfile(join(LCD4linux.WetterPath.value, "0.png")):
1101711012 UseWetterPath = LCD4linux.WetterPath.value
11018- WetterType[ConfigWWW] = ConfigType
11019- WetterZoom[ConfigWWW] = ConfigZoom
11013+ WetterType = ConfigType
11014+ WetterZoom = ConfigZoom
1102011015 POSX, POSY = 1, 0
1102111016 Wmulti = ConfigZoom / 10.0
1102211017 largesize = not ConfigType.startswith("3")
@@ -11049,7 +11044,7 @@ def putWetter(workaround, draw, im):
1104911044 MAX_W = int(55 * 5 * Wmulti)
1105011045 MAX_Wc = int(50 * 2 * Wmulti) - MAX_Wr
1105111046 elif ConfigType == "22":
11052- MAX_W = int(554 * 2 * Wmulti)
11047+ MAX_W = int(55 * 2 * Wmulti)
1105311048 MAX_Wc = int(50 * 2 * Wmulti) - MAX_Wr
1105411049 elif ConfigType == "3":
1105511050 MAX_W = int(48 * 2 * Wmulti) - MAX_Wr
@@ -11062,16 +11057,19 @@ def putWetter(workaround, draw, im):
1106211057 MAX_Wc = MAX_W
1106311058 POSX = int(54 * 2 * Wmulti)
1106411059 POSY = int(40 * 2 * Wmulti)
11065- imageMode = "RGBA" if LCD4linux.WetterTransparenz.value == "true" else "RGB"
11066- self.im[Wim] = Image.new(imageMode, (MAX_W, MAX_H), (0, 0, 0, 0))
11067- if LCD4linux.WetterTransparenz.value == "crop":
11068- POSXs = getSplit(ConfigSplit, ConfigAlign, MAX_Wi, MAX_W)
11069- image_Back = self.im[im].crop((POSXs, ConfigPos, POSXs + MAX_W, ConfigPos + MAX_H))
11070- self.im[Wim].paste(image_Back, (0, 0))
11060+ if LCD4linux.WetterTransparenz.value == "true":
11061+ self.im[Wim] = Image.new('RGBA', (MAX_W, MAX_H), (0, 0, 0, 0))
11062+ else:
11063+ self.im[Wim] = Image.new('RGB', (MAX_W, MAX_H), (0, 0, 0, 0))
11064+ if LCD4linux.WetterTransparenz.value == "crop":
11065+ POSXs = getSplit(ConfigSplit, ConfigAlign, MAX_Wi, MAX_W)
11066+ image_Back = self.im[im].crop((POSXs, ConfigPos, POSXs + MAX_W, ConfigPos + MAX_H))
11067+ self.im[Wim].paste(image_Back, (0, 0))
1107111068 self.draw[Wim] = ImageDraw.Draw(self.im[Wim])
1107211069 if ConfigType != "3" and not ConfigType.startswith("4"):
1107311070 i = 0
1107411071 for curr in self.WWeek[ConfigWWW]:
11072+ L4logE(str(curr))
1107511073 if (i < 4 and ConfigType in ["1", "2", "5"]) or (i < 5 and ConfigType in ["11", "21", "51"]) or (i < 2 and ConfigType in ["12", "22"]):
1107611074 i += 1
1107711075 High = curr.get("High", "0")
@@ -11233,7 +11231,7 @@ def putWetter(workaround, draw, im):
1123311231 else:
1123411232 xx = yy = 20
1123511233 if isfile(join(UseWetterPath, Icon)):
11236- pil_image = Image.open(join(UseWetterPath, Icon)).convert(imageMode )
11234+ pil_image = Image.open(join(UseWetterPath, Icon)).convert("RGBA" if LCD4linux.WetterTransparenz.value == "true" else "RGB" )
1123711235 xx, yy = pil_image.size
1123811236 if ConfigType.startswith("5"):
1123911237 y = int((int(LCD4linux.WetterIconZoom.value) + 5) * Wmulti / xx * yy)
0 commit comments