id = int(request.args["command"][0]) except Exception, e: return { "result": False, "message": "The parameter 'command' must be a number" } type = "" rcu = "" if "type" in request.args.keys(): type = request.args["type"][0] if "rcu" in request.args.keys(): rcu = request.args["rcu"][0] return remoteControl(id, type, rcu) def P_powerstate(self, request): if "newstate" in request.args.keys(): return setPowerState(self.session, request.args["newstate"][0]) return getStandbyState(self.session) def P_getlocations(self, request): return getLocations() def P_getcurrlocation(self, request): return getCurrentLocation() def P_getallservices(self, request): if not config.OpenWebif.xbmcservices.value: return getAllServices()
id = int(request.args["command"][0]) except Exception, e: return { "result": False, "message": _("The parameter 'command' must be a number") } type = "" rcu = "" if "type" in request.args.keys(): type = request.args["type"][0] if "rcu" in request.args.keys(): rcu = request.args["rcu"][0] return remoteControl(id, type, rcu) def P_powerstate(self, request): if "shift" in request.args.keys(): self.P_set_powerup_without_waking_tv(request) if "newstate" in request.args.keys(): return setPowerState(self.session, request.args["newstate"][0]) return getStandbyState(self.session) def P_supports_powerup_without_waking_tv(self, request): try: #returns 'True' if the image supports the function "Power on without TV": f = open("/tmp/powerup_without_waking_tv.txt", "r") powerupWithoutWakingTv = f.read() f.close() if ((powerupWithoutWakingTv == 'True')