1 from time import strftime, localtime
2 from Tools.Directories import fileExists
13 APPROOT = "/usr/local/vbrowser"
16 PLUGINROOT = "/usr/lib/enigma2/python/Plugins/Extensions/Vbrowser"
17 MANUALROOT = "/usr/local/manual"
23 if fileExists("/proc/stb/fb/dst_left"):
25 file = open("/proc/stb/fb/dst_left", "r")
26 dst_left = int(file.read().strip(), 16)
28 file = open("/proc/stb/fb/dst_width", "r")
29 dst_width = int(file.read().strip(), 16)
31 file = open("/proc/stb/fb/dst_top", "r")
32 dst_top = int(file.read().strip(), 16)
34 file = open("/proc/stb/fb/dst_height", "r")
35 dst_height = int(file.read().strip(), 16)
37 except Exception, Err:
40 return (dst_left, dst_width, dst_top, dst_height)
42 def setPosition(params):
45 if params[0] + params[1] > 720 or params[2] + params[3] > 576 :
49 file = open("/proc/stb/fb/dst_left", "w")
50 file.write('%X' % params[0])
52 file = open("/proc/stb/fb/dst_width", "w")
53 file.write('%X' % params[1])
55 file = open("/proc/stb/fb/dst_top", "w")
56 file.write('%X' % params[2])
58 file = open("/proc/stb/fb/dst_height", "w")
59 file.write('%X' % params[3])
61 except Exception, Err:
68 def LogEntry(mode, string):
70 print strftime("%x %X", localtime()), "%5s [%12s]" % (mode, "Plugin"), string
72 print "[vbrowser]", string
75 LogEntry("DEBUG", string)
78 LogEntry("LOG", string)
81 LogEntry("WARN", string)
84 LogEntry("ERROR", string)