コード例 #1
0
 def getRequest(data):
     request = data
     if data == "isRecording":
         import NavigationInstance
         if NavigationInstance.instance.getRecordings():
             request = "True"
         else:
             request = "False"
     elif data == "getDeviceName":
         from enigma import getBoxType
         request = getBoxType()
     elif data == "inStandby":
         import Screens
         request = str(Screens.Standby.inStandby != None)
     elif data.startswith("setPort"):
         try:
             from Components.config import config            
             port = int(data.replace("setPort", ""))
             serverInstance.reconnect(port=port)
             config.AdvancedMovieSelection.server_port.value = port  
             config.AdvancedMovieSelection.server_port.save()
         except Exception as e:
             print(e)
     elif data == "nextTrashEvent":
         from Components.config import config
         if config.AdvancedMovieSelection.auto_empty_wastebasket.value == "-1":
             return "-1"            
         request = str(config.AdvancedMovieSelection.next_auto_empty_wastebasket.value)
     elif data == "lastTrashEvent":
         from Components.config import config
         if config.AdvancedMovieSelection.auto_empty_wastebasket.value == "-1":
             return "-1"            
         request = str(config.AdvancedMovieSelection.last_auto_empty_wastebasket.value)
     return request
コード例 #2
0
 def setPort(self):
     config.AdvancedMovieSelection.server_port.save() 
     port = config.AdvancedMovieSelection.server_port.value
     for client in getClients():
         if client.getAddress() != self.staticIP:
             client.setPort(port)
         else:
             # this only set the port of local client !don't reconnect it!
             client.port = port
     serverInstance.reconnect(port=port)
コード例 #3
0
ファイル: Client.py プロジェクト: wedebe/enigma2-plugins
 def getRequest(data):
     request = data
     if data == "isRecording":
         import NavigationInstance
         if NavigationInstance.instance.getRecordings():
             request = "True"
         else:
             request = "False"
     elif data == "getDeviceName":
         from Tools.HardwareInfo import HardwareInfo
         request = HardwareInfo().get_device_name()
     elif data == "inStandby":
         import Screens
         request = str(Screens.Standby.inStandby != None)
     elif data.startswith("setPort"):
         try:
             from Components.config import config
             port = int(data.replace("setPort", ""))
             serverInstance.reconnect(port=port)
             config.AdvancedMovieSelection.server_port.value = port
             config.AdvancedMovieSelection.server_port.save()
         except Exception, e:
             print e
コード例 #4
0
ファイル: Client.py プロジェクト: Blacksens/enigma2-plugins
 def getRequest(data):
     request = data
     if data == "isRecording":
         import NavigationInstance
         if NavigationInstance.instance.getRecordings():
             request = "True"
         else:
             request = "False"
     elif data == "getDeviceName":
         from Tools.HardwareInfo import HardwareInfo
         request = HardwareInfo().get_device_name()
     elif data == "inStandby":
         import Screens
         request = str(Screens.Standby.inStandby != None)
     elif data.startswith("setPort"):
         try:
             from Components.config import config            
             port = int(data.replace("setPort", ""))
             serverInstance.reconnect(port=port)
             config.AdvancedMovieSelection.server_port.value = port  
             config.AdvancedMovieSelection.server_port.save()
         except Exception, e:
             print e