Skip to content

Commit

Permalink
Merge pull request #420 from MrServo/python3
Browse files Browse the repository at this point in the history
[LCD4Linux] update v5.0-r8i
  • Loading branch information
jbleyel committed Apr 2, 2021
2 parents 6b3d85a + 6d605c3 commit 8eeba96
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
23 changes: 12 additions & 11 deletions LCD4linux/src/WebConfigSite.py
@@ -1,4 +1,3 @@
# print(" LCD4linux.StandbyBildLCD" in zip(*L4)[2])
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import
from twisted.web import resource, http
Expand All @@ -16,8 +15,8 @@
import datetime
import glob
import time

Py = "/usr/lib/enigma2/python/Plugins/Extensions/LCD4linux/plugin.py"
from Tools.Directories import SCOPE_PLUGINS, resolveFilename
Py = resolveFilename(SCOPE_PLUGINS, "Extensions/LCD4linux/plugin.py")

try:
from enigma import eMediaDatabase
Expand Down Expand Up @@ -70,7 +69,7 @@ def ParseCode():
L4log("WebIF: parsing Code....")
for line in open(Py, "r").readlines():
if line.find("self.list1.append") >= 0 or line.find("self.list2.append") >= 0 or line.find("self.list3.append") >= 0 or line.find("self.list4.append") >= 0:
Z = line.replace("getConfigListEntry(_", ",").replace(")", "").replace("(", "").replace(".append", "").replace("\t", "").replace("\n", "").replace("\"", "").split(",")
Z = line.replace("getConfigListEntry(_", ",").replace(")", "").replace("(", "").replace(".append", "").replace("\t", "").replace("\n", "").replace("\r", "").replace("\"", "").split(",")
if Z[0]=="self.list1":
if Z[2].strip()[:13] in M1:
idx = M1.index(Z[2].strip()[:13])
Expand All @@ -88,6 +87,7 @@ def ParseCode():
i3+=1
Z.append(i3)
L3.append(Z)

elif Z[0]=="self.list4":
if Z[1][:1] != "-":
i4+=1
Expand Down Expand Up @@ -360,14 +360,14 @@ def action(self, req):
if (" "+b) in list(zip(*L3))[2]:
print(a, b)
obja = eval(a)
obja = eval(b)
objb = eval(b)
objb.value = obja.value
elif "." in _a:
b = _a.replace(".", ".MP")
if (" "+b) in list(zip(*L3))[2]:
print(a, b)
obja = eval(a)
obja = eval(b)
objb = eval(b)
objb.value = obja.value
elif _command == "copyIdle":
for a in req.args.keys():
Expand All @@ -377,14 +377,14 @@ def action(self, req):
if (" "+b) in list(zip(*L4))[2]:
print(a, b)
obja = eval(a)
obja = eval(b)
objb = eval(b)
objb.value = obja.value
elif "." in _a:
b = _a.replace(".", ".Standby")
if (" "+b) in list(zip(*L4))[2]:
print(a, b)
obja = eval(a)
obja = eval(b)
objb = eval(b)
objb.value = obja.value
elif _command == "copyOn":
for a in req.args.keys():
Expand All @@ -394,14 +394,15 @@ def action(self, req):
if (" "+b) in list(zip(*L2))[2]:
print(a, b)
obja = eval(a)
obja = eval(b)
objb = eval(b)
objb.value = obja.value

elif ".Standby" in _a:
b = _a.replace(".Standby", ".")
if (" "+b) in list(zip(*L2))[2]:
print(a, b)
print(_a, b)
obja = eval(a)
obja = eval(b)
objb = eval(b)
objb.value = obja.value

#####################
Expand Down
4 changes: 3 additions & 1 deletion LCD4linux/src/plugin.py
Expand Up @@ -16,7 +16,7 @@

from __future__ import print_function, absolute_import
from __future__ import division
Version = "V5.0-r8h"
Version = "V5.0-r8i"
from .import _
from enigma import eConsoleAppContainer, eActionMap, iServiceInformation, iFrontendInformation, eDVBResourceManager, eDVBVolumecontrol
from enigma import getDesktop, getEnigmaVersionString
Expand Down Expand Up @@ -9621,6 +9621,8 @@ def downloadListCallback(self, ConfigWWW, page=""):
x=self.WDay[ConfigWWW]["Wind"].split()
if len(x) == 3:
self.WDay[ConfigWWW]["Wind"]="%.1f m/s %s" % (float(int(x[0])/3.6), x[2])
else:
self.WDay[ConfigWWW]["Wind"]="? km/h ?"
self.WDay[ConfigWWW]["Cond"] = curr[0].getAttribute("skytext")
self.WDay[ConfigWWW]["Icon"] = curr[0].getAttribute("skycode") + ".png"
self.WDay[ConfigWWW]["Feel"] = curr[0].getAttribute("feelslike")
Expand Down

0 comments on commit 8eeba96

Please sign in to comment.