예제 #1
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.setTitle(_("PE Cam Manager"))
     self.Console = Console()
     self["key_red"] = StaticText(_("Stop"))
     self["key_green"] = StaticText(_("Start"))
     self["key_yellow"] = StaticText(_("Restart"))
     self["key_blue"] = StaticText(_("Setup"))
     self["actions"] = ActionMap(
         ["OkCancelActions", "ColorActions"], {
             "cancel": self.cancel,
             "ok": self.ok,
             "green": self.start,
             "red": self.stop,
             "yellow": self.restart,
             "blue": self.setup
         })
     self["status"] = Label()
     self["list"] = List([])
     checkconfigdir()
     self.actcam = config.plugins.PECam.actcam.value
     self.camstartcmd = ""
     self.actcampng = LoadPixmap(path=resolveFilename(
         SCOPE_PLUGINS, "Extensions/PECamManager/images/activate.png"))
     self.defcampng = LoadPixmap(path=resolveFilename(
         SCOPE_PLUGINS, "Extensions/PECamManager/images/deactivate.png"))
     self.stoppingTimer = eTimer()
     self.stoppingTimer.timeout.get().append(self.stopping)
     self.closestopTimer = eTimer()
     self.closestopTimer.timeout.get().append(self.closestop)
     self.createinfo()
     self.Timer = eTimer()
     self.Timer.callback.append(self.listecminfo)
     self.Timer.start(2000, False)
예제 #2
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("SoftCam manager"))
		self.Console = Console()
		self["key_red"] = StaticText(_("Stop"))
		self["key_green"] = StaticText(_("Start"))
		self["key_yellow"] = StaticText(_("Restart"))
		self["key_blue"] = StaticText(_("Setup"))
		self["actions"] = ActionMap(["OkCancelActions", "ColorActions"],
			{
				"cancel": self.cancel,
				"ok": self.ok,
				"green": self.start,
				"red": self.stop,
				"yellow": self.restart,
				"blue": self.setup
			})
		self["status"] = Label()
		self["list"] = List([])
		checkconfigdir()
		self.actcam = config.plugins.AltSoftcam.actcam.value
		self.camstartcmd = ""
		self.actcampng = LoadPixmap(resolveFilename(SCOPE_PLUGINS,
			"Extensions/AlternativeSoftCamManager/images/actcam.png"))
		self.defcampng = LoadPixmap(resolveFilename(SCOPE_PLUGINS,
			"Extensions/AlternativeSoftCamManager/images/defcam.png"))
		self.stoppingTimer = eTimer()
		self.stoppingTimer.timeout.get().append(self.stopping)
		self.closestopTimer = eTimer()
		self.closestopTimer.timeout.get().append(self.closestop)
		self.createinfo()
		self.Timer = eTimer()
		self.Timer.callback.append(self.listecminfo)
		self.Timer.start(2000, False)
 def __init__(self, session):
     Screen.__init__(self, session)
     self.setTitle(_('Camd Menager'))
     self.Console = Console()
     self['key_red'] = StaticText(_('Stop'))
     self['key_green'] = StaticText(_('Start'))
     self['key_yellow'] = StaticText(_('Restart'))
     self['key_blue'] = StaticText(_('Setup'))
     self['actions'] = ActionMap(['OkCancelActions', 'ColorActions'], {'cancel': self.cancel,
      'ok': self.ok,
      'green': self.start,
      'red': self.stop,
      'yellow': self.restart,
      'blue': self.setup})
     self['status'] = Label()
     self['list'] = List([])
     checkconfigdir()
     self.actcam = config.plugins.Camd.actcam.value
     self.camstartcmd = ''
     self.actcampng = LoadPixmap(path=resolveFilename(SCOPE_PLUGINS, 'Extensions/CamdMenager/images/activate.png'))
     self.defcampng = LoadPixmap(path=resolveFilename(SCOPE_PLUGINS, 'Extensions/CamdMenager/images/deactivate.png'))
     self.stoppingTimer = eTimer()
     self.stoppingTimer.timeout.get().append(self.stopping)
     self.closestopTimer = eTimer()
     self.closestopTimer.timeout.get().append(self.closestop)
     self.createinfo()
     self.Timer = eTimer()
     self.Timer.callback.append(self.listecminfo)
     self.Timer.start(2000, False)
예제 #4
0
	def camliststart(self):
		if path.exists(config.plugins.AltSoftcam.camdir.value):
			self.softcamlist = listdir(config.plugins.AltSoftcam.camdir.value)
			if self.softcamlist:
				self.softcamlist.sort()
				self.iscam = True
				self.Console.ePopen("chmod 755 %s/*" % config.plugins.AltSoftcam.camdir.value)
				if self.actcam != "none" and getcamscript(self.actcam):
					self.createcamlist()
				else:
					self.Console.ePopen("pidof %s" % self.actcam, self.camactive)
			else:
				self.finish = True
				self["list"].setList([])
		else:
			checkconfigdir()
			self.camliststart()
 def camliststart(self):
     if path.exists(config.plugins.Camd.camdir.value):
         self.softcamlist = listdir(config.plugins.Camd.camdir.value)
         if self.softcamlist:
             self.softcamlist.sort()
             self.iscam = True
             self.Console.ePopen('chmod 755 %s/*' % config.plugins.Camd.camdir.value)
             if self.actcam != 'none' and getcamscript(self.actcam):
                 self.createcamlist()
             else:
                 self.Console.ePopen('pidof %s' % self.actcam, self.camactive)
         else:
             self.finish = True
             self['list'].setList([])
     else:
         checkconfigdir()
         self.camliststart()
예제 #6
0
	def camliststart(self):
		if os.path.exists(config.plugins.AltSoftcam.camdir.value):
			self.softcamlist = os.listdir(config.plugins.AltSoftcam.camdir.value)
			if self.softcamlist:
				self.softcamlist.sort()
				self.iscam = True
				for x in self.softcamlist:
					os.chmod(os.path.join(config.plugins.AltSoftcam.camdir.value, x) , 0755)
				if self.actcam != "none" and getcamscript(self.actcam):
					self.createcamlist()
				else:
					self.Console.ePopen("pidof %s" % self.actcam, self.camactive)
			else:
				self.finish = True
				self["list"].setList([])
		else:
			checkconfigdir()
			self.camliststart()
예제 #7
0
 def camliststart(self):
     if path.exists(config.plugins.PECam.camdir.value):
         self.softcamlist = listdir(config.plugins.PECam.camdir.value)
         if self.softcamlist:
             self.softcamlist.sort()
             self.iscam = True
             self.Console.ePopen("chmod 755 %s/*" %
                                 config.plugins.PECam.camdir.value)
             if self.actcam != "none" and getcamscript(self.actcam):
                 self.createcamlist()
             else:
                 self.Console.ePopen("pidof %s" % self.actcam,
                                     self.camactive)
         else:
             self.finish = True
             self["list"].setList([])
     else:
         checkconfigdir()
         self.camliststart()
예제 #8
0
from Plugins.Plugin import PluginDescriptor

from . import _
from Softcam import checkconfigdir

config.plugins.AltSoftcam = ConfigSubsection()
config.plugins.AltSoftcam.actcam = ConfigText(default="none")
config.plugins.AltSoftcam.camconfig = ConfigText(default="/var/keys",
                                                 visible_width=100,
                                                 fixed_size=False)
config.plugins.AltSoftcam.camdir = ConfigText(default="/var/emu",
                                              visible_width=100,
                                              fixed_size=False)
config.plugins.AltSoftcam.restartext = ConfigYesNo(default=True)

checkconfigdir()


def main(session, **kwargs):
    from Manager import AltCamManager
    session.open(AltCamManager)


def restartcam(session, **kwargs):
    from Startup import RestartCam
    RestartCam(session).restart()


EnigmaStart = False

from Components.config import config, ConfigSubsection, ConfigText
from Plugins.Plugin import PluginDescriptor

from . import _
from Softcam import checkconfigdir


config.plugins.AltSoftcam = ConfigSubsection()
config.plugins.AltSoftcam.actcam = ConfigText(default="none")
config.plugins.AltSoftcam.camconfig = ConfigText(default="/var/keys",
	visible_width=100, fixed_size=False)
config.plugins.AltSoftcam.camdir = ConfigText(default="/var/emu",
	visible_width=100, fixed_size=False)

checkconfigdir()


def main(session, **kwargs):
	from Manager import AltCamManager
	session.open(AltCamManager)


EnigmaStart = False

def startcam(reason, **kwargs):
	if config.plugins.AltSoftcam.actcam.value != "none":
		global EnigmaStart
		if reason == 0 and not EnigmaStart:  # Enigma start and not use reloadPlugins
			from Startup import startcamonstart
			EnigmaStart = True
			startcamonstart.start()