示例#1
0
    def __init__(self,
                 name,
                 category,
                 options,
                 uris=[],
                 torrent=None,
                 metafile=None):
        self.name = name
        self.status = Task._DEFAULT_STATUS

        self.uris = uris
        self.torrent = torrent
        self.metafile = metafile

        self.options = options
        self.category = category

        LoggingMixin.__init__(self)
        self.logger.info('Adding new task: {}...'.format(self))
        self.logger.debug('Task options: {}'.format(options))

        SQLSession.add(self)
        SQLSession.commit()

        self._init()
示例#2
0
文件: Presentable.py 项目: iven/Yaner
    def __init__(self, name, directory, pool):
        self.name = name
        self.directory = directory
        self.pool = pool

        SQLSession.add(self)
        SQLSession.commit()

        self._init()
示例#3
0
    def __init__(self, name, directory, pool):
        self.name = name
        self.directory = directory
        self.pool = pool

        SQLSession.add(self)
        SQLSession.commit()

        self._init()
示例#4
0
    def __init__(self, name, host, user='', passwd='', port='6800', is_local=False):
        self.name = name
        self.user = user
        self.passwd = passwd
        self.host = host
        self.port = port
        self.is_local = is_local

        SQLSession.add(self)
        SQLSession.commit()

        self._init()
示例#5
0
文件: Task.py 项目: iven/Yaner
    def __init__(self, name, category, options, uris=[],
                 torrent=None, metafile=None):
        self.name = name
        self.status = Task._DEFAULT_STATUS

        self.uris = uris
        self.torrent = torrent
        self.metafile = metafile

        self.options = options
        self.category = category

        LoggingMixin.__init__(self)
        self.logger.info('Adding new task: {}...'.format(self))
        self.logger.debug('Task options: {}'.format(options))

        SQLSession.add(self)
        SQLSession.commit()

        self._init()