コード例 #1
0
ファイル: remote.py プロジェクト: pyblub/notpyload
 def __init__(self, manager):
     Thread.__init__(self)
     self.manager = manager
     self.pyload = manager.pyload
     self._ = manager.pyload._
     self.enabled = True
     self.__running = Event()
コード例 #2
0
ファイル: plugin.py プロジェクト: shanhaiying/pyload
 def __init__(self, manager, owner=None):
     Thread.__init__(self)
     self.setDaemon(True)
     self.manager = manager  #: thread manager
     self.pyload = manager.pyload
     #: Owner of the thread, every type should set it or overwrite user
     self.owner = owner
コード例 #3
0
    def __init__(self, pycore=None, pysetup=None):
        global core, setup
        Thread.__init__(self)

        self._ = lambda x: x

        if pycore:
            core = pycore
            config = pycore.config
            self._ = core._
        elif pysetup:
            setup = pysetup
            config = pysetup.config
        else:
            raise Exception("No config context provided")

        self.server = config.get('webui', 'server')
        self.https = config.get('aal', 'activated')
        self.cert = config.get('ssl', 'cert')
        self.key = config.get('ssl', 'key')
        self.host = config.get('webui', 'host')
        self.port = config.get('webui', 'port')
        self.debug = config.get('webui', 'debug')
        self.force_server = config.get('webui', 'force_server')
        self.error = None

        self.setDaemon(True)
コード例 #4
0
    def __init__(self, core):
        Thread.__init__(self)
        self.setDaemon(True)
        self.pyload = core
        self.manager = None  #: set later
        self.error = None
        self.running = Event()

        self.jobs = Queue()

        set_db(self)
コード例 #5
0
ファイル: plugin.py プロジェクト: maxking71/pyload
 def __init__(self, manager, owner=None):
     """
     Constructor
     """
     Thread.__init__(self)
     self.setDaemon(True)
     self.__manager = manager  # Thread manager
     self.__pyload = manager.get_core()
     self._ = self.__pyload._
     # Owner of the thread, every type should set it or overwrite user
     self.owner = owner
コード例 #6
0
ファイル: webserver.py プロジェクト: vuolter/pyload
    def __init__(self, pycore=None, pysetup=None):
        global core, setup
        Thread.__init__(self)

        if pycore:
            core = pycore
            config = pycore.config
        elif pysetup:
            setup = pysetup
            config = pysetup.config
        else:
            raise Exception("No config context provided")

        self.server = config.get('webui', 'server')
        self.https = config.get('aal', 'activated')
        self.cert = config.get('ssl', 'cert')
        self.key = config.get('ssl', 'key')
        self.host = config.get('webui', 'host')
        self.port = config.get('webui', 'port')
        self.debug = config.get('webui', 'debug')
        self.force_server = config.get('webui', 'force_server')
        self.error = None

        self.setDaemon(True)
コード例 #7
0
ファイル: remote.py プロジェクト: vuolter/pyload
 def __init__(self, manager):
     Thread.__init__(self)
     self.manager = manager
     self.pyload = manager.pyload
     self.enabled = True
     self.running = Event()