コード例 #1
0
ファイル: httpdownloader.py プロジェクト: zluca/deluge
    def request(self, method, uri, headers=None, body_producer=None):
        """Issue a new request to the wrapped agent.

        Args:
            method (bytes): The HTTP method to use.
            uri (bytes): The url to download from.
            headers (t.w.h.Headers, optional): Any extra headers to send.
            body_producer (t.w.i.IBodyProducer, optional): Request body data.

        Returns:
            Deferred: The filename of the of the downloaded file.
        """
        if headers is None:
            headers = Headers()

        if not headers.hasHeader(b'User-Agent'):
            version = get_version()
            user_agent = 'Deluge/%s (https://deluge-torrent.org)' % version
            headers.addRawHeader('User-Agent', user_agent)

        d = self.agent.request(method=method,
                               uri=uri,
                               headers=headers,
                               bodyProducer=body_producer)
        d.addCallback(self.request_callback)
        return d
コード例 #2
0
ファイル: client.py プロジェクト: deluge-torrent/deluge
 def authenticate(self, username, password):
     log.debug('%s.authenticate: %s', self.__class__.__name__, username)
     login_deferred = defer.Deferred()
     d = self.call('daemon.login', username, password, client_version=get_version())
     d.addCallbacks(self.__on_login, self.__on_login_fail, callbackArgs=[username, login_deferred],
                    errbackArgs=[login_deferred])
     return login_deferred
コード例 #3
0
    def __init__(self, url, filename, part_callback=None, headers=None,
                 force_filename=False, allow_compression=True):
        """
        :param url: the url to download from
        :type url: string
        :param filename: the filename to save the file as
        :type filename: string
        :param force_filename: forces use of the supplied filename, regardless of header content
        :type force_filename: bool
        :param part_callback: a function to be called when a part of data
            is received, it's signature should be: func(data, current_length, total_length)
        :type part_callback: function
        :param headers: any optional headers to send
        :type headers: dictionary
        """

        self.part_callback = part_callback
        self.current_length = 0
        self.total_length = 0
        self.decoder = None
        self.value = filename
        self.force_filename = force_filename
        self.allow_compression = allow_compression
        self.code = None
        agent = b'Deluge/%s (http://deluge-torrent.org)' % get_version().encode('utf8')

        client.HTTPDownloader.__init__(self, url, filename, headers=headers, agent=agent)
コード例 #4
0
ファイル: server.py プロジェクト: thelamer/deluge
    def render(self, request):
        uri_true = ('true', 'yes', 'on', '1')
        uri_false = ('false', 'no', 'off', '0')

        debug_arg = None
        req_dbg_arg = request.args.get('debug', [b''])[-1].decode().lower()
        if req_dbg_arg in uri_true:
            debug_arg = True
        elif req_dbg_arg in uri_false:
            debug_arg = False

        dev_arg = request.args.get('dev',
                                   [b''])[-1].decode().lower() in uri_true
        dev_ver = 'dev' in common.get_version()

        script_type = 'normal'
        if debug_arg is not None:
            # Use debug arg to force switching to normal script type.
            script_type = 'debug' if debug_arg else 'normal'
        elif dev_arg or dev_ver:
            # Also use dev files if development version.
            script_type = 'dev'

        if not self.js.has_script_type_files(script_type):
            if not dev_ver:
                log.warning(
                    'Failed to enable WebUI "%s" mode, script files are missing!',
                    script_type,
                )
            # Fallback to checking other types in order and selecting first with
            # files available. Ordered to start with dev files lookup.
            for alt_script_type in [
                    x for x in ['dev', 'debug', 'normal'] if x != script_type
            ]:
                if self.js.has_script_type_files(alt_script_type):
                    script_type = alt_script_type
                    if not dev_ver:
                        log.warning('WebUI falling back to "%s" mode.',
                                    script_type)
                    break

        scripts = component.get('Scripts').get_scripts(script_type)
        scripts.insert(0, 'gettext.js')

        template = Template(filename=rpath('index.html'))
        request.setHeader(b'content-type', b'text/html; charset=utf-8')

        web_config = component.get('Web').get_config()
        web_config['base'] = request.base.decode()
        config = {key: web_config[key] for key in UI_CONFIG_KEYS}
        js_config = json.dumps(config)
        # Insert the values into 'index.html' and return.
        return template.render(
            scripts=scripts,
            stylesheets=self.stylesheets,
            debug=str(bool(debug_arg)).lower(),
            base=web_config['base'],
            js_config=js_config,
        )
コード例 #5
0
ファイル: daemon.py プロジェクト: Aniverse/deluge-2
    def __init__(self,
                 listen_interface=None,
                 interface=None,
                 port=None,
                 standalone=False,
                 read_only_config_keys=None):
        """
        Args:
            listen_interface (str, optional): The IP address to listen to bittorrent connections on.
            interface (str, optional): The IP address the daemon will listen for UI connections on.
            port (int, optional): The port the daemon will listen for UI connections on.
            standalone (bool, optional): If True the client is in Standalone mode otherwise, if
                False, start the daemon as separate process.
            read_only_config_keys (list of str, optional): A list of config keys that will not be
                altered by core.set_config() RPC method.
        """
        self.standalone = standalone
        self.pid_file = get_config_dir('deluged.pid')
        log.info('Deluge daemon %s', get_version())
        if is_daemon_running(self.pid_file):
            raise DaemonRunningError(
                'Deluge daemon already running with this config directory!')

        # Twisted catches signals to terminate, so just have it call the shutdown method.
        reactor.addSystemEventTrigger('before', 'shutdown', self._shutdown)

        # Catch some Windows specific signals
        if windows_check():

            def win_handler(ctrl_type):
                """Handle the Windows shutdown or close events."""
                log.debug('windows handler ctrl_type: %s', ctrl_type)
                if ctrl_type == CTRL_CLOSE_EVENT or ctrl_type == CTRL_SHUTDOWN_EVENT:
                    self._shutdown()
                    return 1

            SetConsoleCtrlHandler(win_handler)

        # Start the core as a thread and join it until it's done
        self.core = Core(listen_interface=listen_interface,
                         read_only_config_keys=read_only_config_keys)

        if port is None:
            port = self.core.config['daemon_port']
        self.port = port

        if interface and not is_ip(interface):
            log.error('Invalid UI interface (must be IP Address): %s',
                      interface)
            interface = None

        self.rpcserver = RPCServer(
            port=port,
            allow_remote=self.core.config['allow_remote'],
            listen=not standalone,
            interface=interface)

        log.debug('Listening to UI on: %s:%s and bittorrent on: %s', interface,
                  port, listen_interface)
コード例 #6
0
    def enable(self, config=None):
        if config is None:
            self.config = IfacewatchConfig(self.log)
        else:
            self.config = config
        self.log.info("Enabled Iface Watch %s" % common.get_version())

        self.scheduler_timer()
        self.check_interface()
コード例 #7
0
def get_version():
    version_str = '%s\n' % (common.get_version())
    try:
        from deluge._libtorrent import lt
        version_str += 'libtorrent: %s\n' % lt.__version__
    except ImportError:
        pass
    version_str += 'Python: %s\n' % platform.python_version()
    version_str += 'OS: %s %s\n' % (platform.system(), ' '.join(common.get_os_version()))
    return version_str
コード例 #8
0
ファイル: client.py プロジェクト: newfyle/deluge
 def authenticate(self, username, password):
     log.debug('%s.authenticate: %s', self.__class__.__name__, username)
     login_deferred = defer.Deferred()
     d = self.call('daemon.login', username, password, client_version=get_version())
     d.addCallbacks(
         self.__on_login,
         self.__on_login_fail,
         callbackArgs=[username, login_deferred],
         errbackArgs=[login_deferred],
     )
     return login_deferred
コード例 #9
0
def get_version():
    version_str = '%s\n' % (common.get_version())
    try:
        from deluge._libtorrent import lt
        version_str += 'libtorrent: %s\n' % lt.__version__
    except ImportError:
        pass
    version_str += 'Python: %s\n' % platform.python_version()
    version_str += 'OS: %s %s\n' % (platform.system(), ' '.join(
        common.get_os_version()))
    return version_str
コード例 #10
0
    class Template(MakoTemplate):
        """
        A template that adds some built-ins to the rendering
        """

        builtins = {'_': _, 'escape': escape, 'version': common.get_version()}

        def render(self, *args, **data):
            data.update(self.builtins)
            rendered = MakoTemplate.render_unicode(self, *args, **data)
            return rendered.encode('utf-8', 'replace')
コード例 #11
0
ファイル: argparserbase.py プロジェクト: wasamasa/deluge
def _get_version_detail():
    version_str = '%s\n' % (common.get_version())
    try:
        from deluge._libtorrent import LT_VERSION

        version_str += 'libtorrent: %s\n' % LT_VERSION
    except ImportError:
        pass
    version_str += 'Python: %s\n' % platform.python_version()
    version_str += 'OS: %s %s\n' % (platform.system(), common.get_os_version())
    return version_str
コード例 #12
0
ファイル: daemon.py プロジェクト: deluge-torrent/deluge
    def __init__(self, listen_interface=None, interface=None, port=None, standalone=False,
                 read_only_config_keys=None):
        """
        Args:
            listen_interface (str, optional): The IP address to listen to bittorrent connections on.
            interface (str, optional): The IP address the daemon will listen for UI connections on.
            port (int, optional): The port the daemon will listen for UI connections on.
            standalone (bool, optional): If True the client is in Standalone mode otherwise, if
                False, start the daemon as separate process.
            read_only_config_keys (list of str, optional): A list of config keys that will not be
                altered by core.set_config() RPC method.
        """
        self.standalone = standalone
        self.pid_file = get_config_dir('deluged.pid')
        log.info('Deluge daemon %s', get_version())
        if is_daemon_running(self.pid_file):
            raise DaemonRunningError('Deluge daemon already running with this config directory!')

        # Twisted catches signals to terminate, so just have it call the shutdown method.
        reactor.addSystemEventTrigger('before', 'shutdown', self._shutdown)

        # Catch some Windows specific signals
        if windows_check():
            def win_handler(ctrl_type):
                """Handle the Windows shutdown or close events."""
                log.debug('windows handler ctrl_type: %s', ctrl_type)
                if ctrl_type == CTRL_CLOSE_EVENT or ctrl_type == CTRL_SHUTDOWN_EVENT:
                    self._shutdown()
                    return 1
            SetConsoleCtrlHandler(win_handler)

        # Start the core as a thread and join it until it's done
        self.core = Core(listen_interface=listen_interface,
                         read_only_config_keys=read_only_config_keys)

        if port is None:
            port = self.core.config['daemon_port']
        self.port = port

        if interface and not is_ip(interface):
            log.error('Invalid UI interface (must be IP Address): %s', interface)
            interface = None

        self.rpcserver = RPCServer(
            port=port,
            allow_remote=self.core.config['allow_remote'],
            listen=not standalone,
            interface=interface
        )

        log.debug('Listening to UI on: %s:%s and bittorrent on: %s', interface, port, listen_interface)
コード例 #13
0
ファイル: server.py プロジェクト: newfyle/deluge
    def render(self, request):
        uri_true = ('true', 'yes', '1')
        debug_arg = request.args.get('debug', [''])[-1] in uri_true
        dev_arg = request.args.get('dev', [''])[-1] in uri_true
        dev_ver = 'dev' in common.get_version()

        script_type = 'normal'
        if debug_arg:
            script_type = 'debug'
        # Override debug if dev arg or version.
        if dev_arg or dev_ver:
            script_type = 'dev'

        if not self.js.has_script_type_files(script_type):
            if not dev_ver:
                log.warning(
                    'Failed to enable WebUI "%s" mode, script files are missing!',
                    script_type,
                )
            # Fallback to checking other types in order and selecting first with files available.
            for alt_script_type in [
                    x for x in ['normal', 'debug', 'dev'] if x != script_type
            ]:
                if self.js.has_script_type_files(alt_script_type):
                    script_type = alt_script_type
                    if not dev_ver:
                        log.warning('WebUI falling back to "%s" mode.',
                                    script_type)
                    break

        scripts = component.get('Scripts').get_scripts(script_type)
        scripts.insert(0, 'gettext.js')

        template = Template(filename=rpath('index.html'))
        request.setHeader(b'content-type', b'text/html; charset=utf-8')

        web_config = component.get('Web').get_config()
        web_config['base'] = request.base.decode()
        config = {key: web_config[key] for key in UI_CONFIG_KEYS}
        js_config = json.dumps(config)
        # Insert the values into 'index.html' and return.
        return template.render(
            scripts=scripts,
            stylesheets=self.stylesheets,
            debug=str(debug_arg).lower(),
            base=web_config['base'],
            js_config=js_config,
        )
コード例 #14
0
ファイル: server.py プロジェクト: Aniverse/deluge-1
    def render(self, request):
        debug = False
        if 'debug' in request.args:
            debug_arg = request.args.get('debug')[-1]
            if debug_arg in ('true', 'yes', '1'):
                debug = True
            else:
                debug = False

        dev = 'dev' in common.get_version()
        if 'dev' in request.args:
            dev_arg = request.args.get('dev')[-1]
            if dev_arg in ('true', 'yes' '1'):
                dev = True
            else:
                dev = False

        if dev:
            mode = 'dev'
        elif debug:
            mode = 'debug'
        else:
            mode = None

        scripts = component.get("Scripts").get_scripts(mode)
        scripts.insert(0, "gettext.js")

        template = Template(filename=rpath("index.html"))
        request.setHeader("content-type", "text/html; charset=utf-8")

        web_config = component.get("Web").get_config()
        web_config["base"] = request.base
        config = dict([(key, web_config[key]) for key in UI_CONFIG_KEYS])
        js_config = common.json.dumps(config)
        return template.render(scripts=scripts,
                               stylesheets=self.stylesheets,
                               debug=debug,
                               base=request.base,
                               js_config=js_config)
コード例 #15
0
ファイル: server.py プロジェクト: deluge-torrent/deluge
    def render(self, request):
        uri_true = ('true', 'yes', '1')
        debug_arg = request.args.get('debug', [''])[-1] in uri_true
        dev_arg = request.args.get('dev', [''])[-1] in uri_true
        dev_ver = 'dev' in common.get_version()

        script_type = 'normal'
        if debug_arg:
            script_type = 'debug'
        # Override debug if dev arg or version.
        if dev_arg or dev_ver:
            script_type = 'dev'

        if not self.js.has_script_type_files(script_type):
            if not dev_ver:
                log.warning('Failed to enable WebUI "%s" mode, script files are missing!', script_type)
            # Fallback to checking other types in order and selecting first with files available.
            for alt_script_type in [x for x in ['normal', 'debug', 'dev'] if x != script_type]:
                if self.js.has_script_type_files(alt_script_type):
                    script_type = alt_script_type
                    if not dev_ver:
                        log.warning('WebUI falling back to "%s" mode.', script_type)
                    break

        scripts = component.get('Scripts').get_scripts(script_type)
        scripts.insert(0, 'gettext.js')

        template = Template(filename=rpath('index.html'))
        request.setHeader(b'content-type', b'text/html; charset=utf-8')

        web_config = component.get('Web').get_config()
        web_config['base'] = request.base
        config = dict([(key, web_config[key]) for key in UI_CONFIG_KEYS])
        js_config = json.dumps(config)
        # Insert the values into 'index.html' and return.
        return template.render(scripts=scripts, stylesheets=self.stylesheets,
                               debug=debug_arg, base=request.base, js_config=js_config)
コード例 #16
0
ファイル: httpdownloader.py プロジェクト: Aniverse/deluge-2
    def __init__(self,
                 url,
                 filename,
                 part_callback=None,
                 headers=None,
                 force_filename=False,
                 allow_compression=True):
        """
        :param url: the url to download from
        :type url: string
        :param filename: the filename to save the file as
        :type filename: string
        :param force_filename: forces use of the supplied filename, regardless of header content
        :type force_filename: bool
        :param part_callback: a function to be called when a part of data
            is received, it's signature should be: func(data, current_length, total_length)
        :type part_callback: function
        :param headers: any optional headers to send
        :type headers: dictionary
        """

        self.part_callback = part_callback
        self.current_length = 0
        self.total_length = 0
        self.decoder = None
        self.value = filename
        self.force_filename = force_filename
        self.allow_compression = allow_compression
        self.code = None
        agent = b'Deluge/%s (http://deluge-torrent.org)' % get_version(
        ).encode('utf8')

        client.HTTPDownloader.__init__(self,
                                       url,
                                       filename,
                                       headers=headers,
                                       agent=agent)
コード例 #17
0
ファイル: server.py プロジェクト: chlen-nigera/Deluge.app
    def render(self, request):
        debug = False
        if 'debug' in request.args:
            debug_arg = request.args.get('debug')[-1]
            if debug_arg in ('true', 'yes', '1'):
                debug = True
            else:
                debug = False

        dev = 'dev' in common.get_version()
        if 'dev' in request.args:
            dev_arg = request.args.get('dev')[-1]
            if dev_arg in ('true', 'yes' '1'):
                dev = True
            else:
                dev = False

        if dev:
            mode = 'dev'
        elif debug:
            mode = 'debug'
        else:
            mode = None

        scripts = component.get("Scripts").get_scripts(mode)
        scripts.insert(0, "gettext.js")

        template = Template(filename=rpath("index.html"))
        request.setHeader("content-type", "text/html; charset=utf-8")

        web_config = component.get("Web").get_config()
        web_config["base"] = request.base
        config = dict([(key, web_config[key]) for key in UI_CONFIG_KEYS])
        js_config = common.json.dumps(config)
        return template.render(scripts=scripts, stylesheets=self.stylesheets,
            debug=debug, base=request.base, js_config=js_config)
コード例 #18
0
    def __init__(self):
        self.about = gtk.AboutDialog()
        self.about.set_transient_for(component.get('MainWindow').window)
        self.about.set_position(gtk.WIN_POS_CENTER)
        self.about.set_program_name(_('Deluge'))
        if windows_check():

            def url_hook(dialog, url):
                """Url hook for Windows OS which has no default browser."""
                open_url_in_browser(url)
                return True

            self.about.connect('activate-link', url_hook)

        version = get_version()

        self.about.set_copyright(
            _('Copyright %(year_start)s-%(year_end)s Deluge Team')
            % {'year_start': 2007, 'year_end': 2015}
        )
        self.about.set_comments(
            _('A peer-to-peer file sharing program\nutilizing the BitTorrent protocol.')
            + '\n\n'
            + _('Client:')
            + ' %s\n' % version
        )
        self.about.set_version(version)
        self.about.set_authors(
            [
                _('Current Developers:'),
                'Andrew Resch',
                'Damien Churchill',
                'John Garland',
                'Calum Lind',
                '',
                'libtorrent (libtorrent.org):',
                'Arvid Norberg',
                '',
                _('Past Developers or Contributors:'),
                'Zach Tibbitts',
                'Alon Zakai',
                'Marcos Mobley',
                'Alex Dedul',
                'Sadrul Habib Chowdhury',
                'Ido Abramovich',
                'Martijn Voncken',
            ]
        )
        self.about.set_artists(['Andrew Wedderburn', 'Andrew Resch'])
        self.about.set_translator_credits(
            '\n'.join(
                [
                    'Aaron Wang Shi',
                    'abbigss',
                    'ABCdatos',
                    'Abcx',
                    'Actam',
                    'Adam',
                    'adaminikisi',
                    'adi_oporanu',
                    'Adrian Goll',
                    'afby',
                    'Ahmades',
                    'Ahmad Farghal',
                    'Ahmad Gharbeia أحمد غربية',
                    'akira',
                    'Aki Sivula',
                    'Alan Pepelko',
                    'Alberto',
                    'Alberto Ferrer',
                    'alcatr4z',
                    'AlckO',
                    'Aleksej Korgenkov',
                    'Alessio Treglia',
                    'Alexander Ilyashov',
                    'Alexander Matveev',
                    'Alexander Saltykov',
                    'Alexander Taubenkorb',
                    'Alexander Telenga',
                    'Alexander Yurtsev',
                    'Alexandre Martani',
                    'Alexandre Rosenfeld',
                    'Alexandre Sapata Carbonell',
                    'Alexey Osipov',
                    'Alin Claudiu Radut',
                    'allah',
                    'AlSim',
                    'Alvaro Carrillanca P.',
                    'A.Matveev',
                    'Andras Hipsag',
                    'András Kárász',
                    'Andrea Ratto',
                    'Andreas Johansson',
                    'Andreas Str',
                    'André F. Oliveira',
                    'AndreiF',
                    'andrewh',
                    'Angel Guzman Maeso',
                    'Aníbal Deboni Neto',
                    'animarval',
                    'Antonio Cono',
                    'antoniojreyes',
                    'Anton Shestakov',
                    'Anton Yakutovich',
                    'antou',
                    'Arkadiusz Kalinowski',
                    'Artin',
                    'artir',
                    'Astur',
                    'Athanasios Lefteris',
                    'Athmane MOKRAOUI (ButterflyOfFire)',
                    'Augusta Carla Klug',
                    'Avoledo Marco',
                    'axaard',
                    'AxelRafn',
                    'Axezium',
                    'Ayont',
                    'b3rx',
                    'Bae Taegil',
                    'Bajusz Tamás',
                    "Balaam's Miracle",
                    'Ballestein',
                    'Bent Ole Fosse',
                    'berto89',
                    'bigx',
                    'Bjorn Inge Berg',
                    'blackbird',
                    'Blackeyed',
                    'blackmx',
                    'BlueSky',
                    'Blutheo',
                    'bmhm',
                    'bob00work',
                    'boenki',
                    'Bogdan Bădic-Spătariu',
                    'bonpu',
                    'Boone',
                    'boss01',
                    'Branislav Jovanović',
                    'bronze',
                    'brownie',
                    'Brus46',
                    'bumper',
                    'butely',
                    'BXCracer',
                    'c0nfidencal',
                    'Can Kaya',
                    'Carlos Alexandro Becker',
                    'cassianoleal',
                    'Cédric.h',
                    'César Rubén',
                    'chaoswizard',
                    'Chen Tao',
                    'chicha',
                    'Chien Cheng Wei',
                    'Christian Kopac',
                    'Christian Widell',
                    'Christoffer Brodd-Reijer',
                    'christooss',
                    'CityAceE',
                    'Clopy',
                    'Clusty',
                    'cnu',
                    'Commandant',
                    'Constantinos Koniaris',
                    'Coolmax',
                    'cosmix',
                    'Costin Chirvasuta',
                    'CoVaLiDiTy',
                    'cow_2001',
                    'Crispin Kirchner',
                    'crom',
                    'Cruster',
                    'Cybolic',
                    'Dan Bishop',
                    'Danek',
                    'Dani',
                    'Daniel Demarco',
                    'Daniel Ferreira',
                    'Daniel Frank',
                    'Daniel Holm',
                    'Daniel Høyer Iversen',
                    'Daniel Marynicz',
                    'Daniel Nylander',
                    'Daniel Patriche',
                    'Daniel Schildt',
                    'Daniil Sorokin',
                    'Dante Díaz',
                    'Daria Michalska',
                    'DarkenCZ',
                    'Darren',
                    'Daspah',
                    'David Eurenius',
                    'davidhjelm',
                    'David Machakhelidze',
                    'Dawid Dziurdzia',
                    'Daya Adianto ',
                    'dcruz',
                    'Deady',
                    'Dereck Wonnacott',
                    'Devgru',
                    'Devid Antonio Filoni' 'DevilDogTG',
                    'di0rz`',
                    'Dialecti Valsamou',
                    'Diego Medeiros',
                    'Dkzoffy',
                    'Dmitrij D. Czarkoff',
                    'Dmitriy Geels',
                    'Dmitry Olyenyov',
                    'Dominik Kozaczko',
                    'Dominik Lübben',
                    'doomster',
                    'Dorota Król',
                    'Doyen Philippe',
                    'Dread Knight',
                    'DreamSonic',
                    'duan',
                    'Duong Thanh An',
                    'DvoglavaZver',
                    'dwori',
                    'dylansmrjones',
                    'Ebuntor',
                    'Edgar Alejandro Jarquin Flores',
                    'Eetu',
                    'ekerazha',
                    'Elias Julkunen',
                    'elparia',
                    'Emberke',
                    'Emiliano Goday Caneda',
                    'EndelWar',
                    'eng.essam',
                    'enubuntu',
                    'ercangun',
                    'Erdal Ronahi',
                    'ergin üresin',
                    'Eric',
                    'Éric Lassauge',
                    'Erlend Finvåg',
                    'Errdil',
                    'ethan shalev',
                    'Evgeni Spasov',
                    'ezekielnin',
                    'Fabian Ordelmans',
                    'Fabio Mazanatti',
                    'Fábio Nogueira',
                    'FaCuZ',
                    'Felipe Lerena',
                    'Fernando Pereira',
                    'fjetland',
                    'Florian Schäfer',
                    'FoBoS',
                    'Folke',
                    'Force',
                    'fosk',
                    'fragarray',
                    'freddeg',
                    'Frédéric Perrin',
                    'Fredrik Kilegran',
                    'FreeAtMind',
                    'Fulvio Ciucci',
                    'Gabor Kelemen',
                    'Galatsanos Panagiotis',
                    'Gaussian',
                    'gdevitis',
                    'Georg Brzyk',
                    'George Dumitrescu',
                    'Georgi Arabadjiev',
                    'Georg Sieber',
                    'Gerd Radecke',
                    'Germán Heusdens',
                    'Gianni Vialetto',
                    'Gigih Aji Ibrahim',
                    'Giorgio Wicklein',
                    'Giovanni Rapagnani',
                    'Giuseppe',
                    'gl',
                    'glen',
                    'granjerox',
                    'Green Fish',
                    'greentea',
                    'Greyhound',
                    'G. U.',
                    'Guillaume BENOIT',
                    'Guillaume Pelletier',
                    'Gustavo Henrique Klug',
                    'gutocarvalho',
                    'Guybrush88',
                    'Hans Rødtang',
                    'HardDisk',
                    'Hargas Gábor',
                    'Heitor Thury Barreiros Barbosa',
                    'helios91940',
                    'helix84',
                    'Helton Rodrigues',
                    'Hendrik Luup',
                    'Henrique Ferreiro',
                    'Henry Goury-Laffont',
                    'Hezy Amiel',
                    'hidro',
                    'hoball',
                    'hokten',
                    'Holmsss',
                    'hristo.num',
                    'Hubert Życiński',
                    'Hyo',
                    'Iarwain',
                    'ibe',
                    'ibear',
                    'Id2ndR',
                    'Igor Zubarev',
                    'IKON (Ion)',
                    'imen',
                    'Ionuț Jula',
                    'Isabelle STEVANT',
                    'István Nyitrai',
                    'Ivan Petrovic',
                    'Ivan Prignano',
                    'IvaSerge',
                    'jackmc',
                    'Jacks0nxD',
                    'Jack Shen',
                    'Jacky Yeung',
                    'Jacques Stadler',
                    'Janek Thomaschewski',
                    'Jan Kaláb',
                    'Jan Niklas Hasse',
                    'Jasper Groenewegen',
                    'Javi Rodríguez',
                    'Jayasimha (ಜಯಸಿಂಹ)',
                    'jeannich',
                    'Jeff Bailes',
                    'Jesse Zilstorff',
                    'Joan Duran',
                    'João Santos',
                    'Joar Bagge',
                    'Joe Anderson',
                    'Joel Calado',
                    'Johan Linde',
                    'John Garland',
                    'Jojan',
                    'jollyr0ger',
                    'Jonas Bo Grimsgaard',
                    'Jonas Granqvist',
                    'Jonas Slivka',
                    'Jonathan Zeppettini',
                    'Jørgen',
                    'Jørgen Tellnes',
                    'josé',
                    'José Geraldo Gouvêa',
                    'José Iván León Islas',
                    'José Lou C.',
                    'Jose Sun',
                    'Jr.',
                    'Jukka Kauppinen',
                    'Julián Alarcón',
                    'julietgolf',
                    'Jusic',
                    'Justzupi',
                    'Kaarel',
                    'Kai Thomsen',
                    'Kalman Tarnay',
                    'Kamil Páral',
                    'Kane_F',
                    '*****@*****.**',
                    'Kateikyoushii',
                    'kaxhinaz',
                    'Kazuhiro NISHIYAMA',
                    'Kerberos',
                    'Keresztes Ákos',
                    'kevintyk',
                    'kiersie',
                    'Kimbo^',
                    'Kim Lübbe',
                    'kitzOgen',
                    'Kjetil Rydland',
                    'kluon',
                    'kmikz',
                    'Knedlyk',
                    'koleoptero',
                    'Kőrösi Krisztián',
                    'Kouta',
                    'Krakatos',
                    'Krešo Kunjas',
                    'kripken',
                    'Kristaps',
                    'Kristian Øllegaard',
                    'Kristoffer Egil Bonarjee',
                    'Krzysztof Janowski',
                    'Krzysztof Zawada',
                    'Larry Wei Liu',
                    'laughterwym',
                    'Laur Mõtus',
                    'lazka',
                    'leandrud',
                    'lê bình',
                    'Le Coz Florent',
                    'Leo',
                    'liorda',
                    'LKRaider',
                    'LoLo_SaG',
                    'Long Tran',
                    'Lorenz',
                    'Low Kian Seong',
                    'Luca Andrea Rossi',
                    'Luca Ferretti',
                    'Lucky LIX',
                    'Luis Gomes',
                    'Luis Reis',
                    'Łukasz Wyszyński',
                    'luojie-dune',
                    'maaark',
                    'Maciej Chojnacki',
                    'Maciej Meller',
                    'Mads Peter Rommedahl',
                    'Major Kong',
                    'Malaki',
                    'malde',
                    'Malte Lenz',
                    'Mantas Kriaučiūnas',
                    'Mara Sorella',
                    'Marcin',
                    'Marcin Falkiewicz',
                    'marcobra',
                    'Marco da Silva',
                    'Marco de Moulin',
                    'Marco Rodrigues',
                    'Marcos',
                    'Marcos Escalier',
                    'Marcos Mobley',
                    'Marcus Ekstrom',
                    'Marek Dębowski',
                    'Mário Buči',
                    'Mario Munda',
                    'Marius Andersen',
                    'Marius Hudea',
                    'Marius Mihai',
                    'Mariusz Cielecki',
                    'Mark Krapivner',
                    'marko-markovic',
                    'Markus Brummer',
                    'Markus Sutter',
                    'Martin',
                    'Martin Dybdal',
                    'Martin Iglesias',
                    'Martin Lettner',
                    'Martin Pihl',
                    'Masoud Kalali',
                    'mat02',
                    'Matej Urbančič',
                    'Mathias-K',
                    'Mathieu Arès',
                    'Mathieu D. (MatToufoutu)',
                    'Mathijs',
                    'Matrik',
                    'Matteo Renzulli',
                    'Matteo Settenvini',
                    'Matthew Gadd',
                    'Matthias Benkard',
                    'Matthias Mailänder',
                    'Mattias Ohlsson',
                    'Mauro de Carvalho',
                    'Max Molchanov',
                    'Me',
                    'MercuryCC',
                    'Mert Bozkurt',
                    'Mert Dirik',
                    'MFX',
                    'mhietar',
                    'mibtha',
                    'Michael Budde',
                    'Michael Kaliszka',
                    'Michalis Makaronides',
                    'Michał Tokarczyk',
                    'Miguel Pires da Rosa',
                    'Mihai Capotă',
                    'Miika Metsälä',
                    'Mikael Fernblad',
                    'Mike Sierra',
                    'mikhalek',
                    'Milan Prvulović',
                    'Milo Casagrande',
                    'Mindaugas',
                    'Miroslav Matejaš',
                    'misel',
                    'mithras',
                    'Mitja Pagon',
                    'M.Kitchen',
                    'Mohamed Magdy',
                    'moonkey',
                    'MrBlonde',
                    'muczy',
                    'Münir Ekinci',
                    'Mustafa Temizel',
                    'mvoncken',
                    'Mytonn',
                    'NagyMarton',
                    'neaion',
                    'Neil Lin',
                    'Nemo',
                    'Nerijus Arlauskas',
                    'Nicklas Larsson',
                    'Nicolaj Wyke',
                    'Nicola Piovesan',
                    'Nicolas Sabatier',
                    'Nicolas Velin',
                    'Nightfall',
                    'NiKoB',
                    'Nikolai M. Riabov',
                    'Niko_Thien',
                    'niska',
                    'Nithir',
                    'noisemonkey',
                    'nomemohes',
                    'nosense',
                    'null',
                    'Nuno Estêvão',
                    'Nuno Santos',
                    'nxxs',
                    'nyo',
                    'obo',
                    'Ojan',
                    'Olav Andreas Lindekleiv',
                    'oldbeggar',
                    'Olivier FAURAX',
                    'orphe',
                    'osantana',
                    'Osman Tosun',
                    'OssiR',
                    'otypoks',
                    'ounn',
                    'Oz123',
                    'Özgür BASKIN',
                    'Pablo Carmona A.',
                    'Pablo Ledesma',
                    'Pablo Navarro Castillo',
                    'Paco Molinero',
                    'Pål-Eivind Johnsen',
                    'pano',
                    'Paolo Naldini',
                    'Paracelsus',
                    'Patryk13_03',
                    'Patryk Skorupa',
                    'PattogoTehen',
                    'Paul Lange',
                    'Pavcio',
                    'Paweł Wysocki',
                    'Pedro Brites Moita',
                    'Pedro Clemente Pereira Neto',
                    'Pekka "PEXI" Niemistö',
                    'Penegal',
                    'Penzo',
                    'perdido',
                    'Peter Kotrcka',
                    'Peter Skov',
                    'Peter Van den Bosch',
                    'Petter Eklund',
                    'Petter Viklund',
                    'phatsphere',
                    'Phenomen',
                    'Philipi',
                    'Philippides Homer',
                    'phoenix',
                    'pidi',
                    'Pierre Quillery',
                    'Pierre Rudloff',
                    'Pierre Slamich',
                    'Pietrao',
                    'Piotr Strębski',
                    'Piotr Wicijowski',
                    'Pittmann Tamás',
                    'Playmolas',
                    'Prescott',
                    'Prescott_SK',
                    'pronull',
                    'Przemysław Kulczycki',
                    'Pumy',
                    'pushpika',
                    'PY',
                    'qubicllj',
                    'r21vo',
                    'Rafał Barański',
                    'rainofchaos',
                    'Rajbir',
                    'ras0ir',
                    'Rat',
                    'rd1381',
                    'Renato',
                    'Rene Hennig',
                    'Rene Pärts',
                    'Ricardo Duarte',
                    'Richard',
                    'Robert Hrovat',
                    'Roberth Sjonøy',
                    'Robert Lundmark',
                    'Robin Jakobsson',
                    'Robin Kåveland',
                    'Rodrigo Donado',
                    'Roel Groeneveld',
                    'rohmaru',
                    'Rolf Christensen',
                    'Rolf Leggewie',
                    'Roni Kantis',
                    'Ronmi',
                    'Rostislav Raykov',
                    'royto',
                    'RuiAmaro',
                    'Rui Araújo',
                    'Rui Moura',
                    'Rune Svendsen',
                    'Rusna',
                    'Rytis',
                    'Sabirov Mikhail',
                    'salseeg',
                    'Sami Koskinen',
                    'Samir van de Sand',
                    'Samuel Arroyo Acuña',
                    'Samuel R. C. Vale',
                    'Sanel',
                    'Santi',
                    'Santi Martínez Cantelli',
                    'Sardan',
                    'Sargate Kanogan',
                    'Sarmad Jari',
                    'Saša Bodiroža',
                    'sat0shi',
                    'Saulius Pranckevičius',
                    'Savvas Radevic',
                    'Sebastian Krauß',
                    'Sebastián Porta',
                    'Sedir',
                    'Sefa Denizoğlu',
                    'sekolands',
                    'Selim Suerkan',
                    'semsomi',
                    'Sergii Golovatiuk',
                    'setarcos',
                    'Sheki',
                    'Shironeko',
                    'Shlomil',
                    'silfiriel',
                    'Simone Tolotti',
                    'Simone Vendemia',
                    'sirkubador',
                    'Sławomir Więch',
                    'slip',
                    'slyon',
                    'smoke',
                    'Sonja',
                    'spectral',
                    'spin_555',
                    'spitf1r3',
                    'Spiziuz',
                    'Spyros Theodoritsis',
                    'SqUe',
                    'Squigly',
                    'srtck',
                    'Stefan Horning',
                    'Stefano Maggiolo',
                    'Stefano Roberto Soleti',
                    'steinberger',
                    'Stéphane Travostino',
                    'Stephan Klein',
                    'Steven De Winter',
                    'Stevie',
                    'Stian24',
                    'stylius',
                    'Sukarn Maini',
                    'Sunjae Park',
                    'Susana Pereira',
                    'szymon siglowy',
                    'takercena',
                    'TAS',
                    'Taygeto',
                    'temy4',
                    'texxxxxx',
                    'thamood',
                    'Thanos Chatziathanassiou',
                    'Tharawut Paripaiboon',
                    'Theodoor',
                    'Théophane Anestis',
                    'Thor Marius K. Høgås',
                    'Tiago Silva',
                    'Tiago Sousa',
                    'Tikkel',
                    'tim__b',
                    'Tim Bordemann',
                    'Tim Fuchs',
                    'Tim Kornhammar',
                    'Timo',
                    'Timo Jyrinki',
                    'Timothy Babych',
                    'TitkosRejtozo',
                    'Tom',
                    'Tomas Gustavsson',
                    'Tomas Valentukevičius',
                    'Tomasz Dominikowski',
                    'Tomislav Plavčić',
                    'Tom Mannerhagen',
                    'Tommy Mikkelsen',
                    'Tom Verdaat',
                    'Tony Manco',
                    'Tor Erling H. Opsahl',
                    'Toudi',
                    'tqm_z',
                    'Trapanator',
                    'Tribaal',
                    'Triton',
                    'TuniX12',
                    'Tuomo Sipola',
                    'turbojugend_gr',
                    'Turtle.net',
                    'twilight',
                    'tymmej',
                    'Ulrik',
                    'Umarzuki Mochlis',
                    'unikob',
                    'Vadim Gusev',
                    'Vagi',
                    'Valentin Bora',
                    'Valmantas Palikša',
                    'VASKITTU',
                    'Vassilis Skoullis',
                    'vetal17',
                    'vicedo',
                    'viki',
                    'villads hamann',
                    'Vincent Garibal',
                    'Vincent Ortalda',
                    'vinchi007',
                    'Vinícius de Figueiredo Silva',
                    'Vinzenz Vietzke',
                    'virtoo',
                    'virtual_spirit',
                    'Vitor Caike',
                    'Vitor Lamas Gatti',
                    'Vladimir Lazic',
                    'Vladimir Sharshov',
                    'Wanderlust',
                    'Wander Nauta',
                    'Ward De Ridder',
                    'WebCrusader',
                    'webdr',
                    'Wentao Tang',
                    'wilana',
                    'Wilfredo Ernesto Guerrero Campos',
                    'Wim Champagne',
                    'World Sucks',
                    'Xabi Ezpeleta',
                    'Xavi de Moner',
                    'XavierToo',
                    'XChesser',
                    'Xiaodong Xu',
                    'xyb',
                    'Yaron',
                    'Yasen Pramatarov',
                    'YesPoX',
                    'Yuren Ju',
                    'Yves MATHIEU',
                    'zekopeko',
                    'zhuqin',
                    'Zissan',
                    'Γιάννης Κατσαμπίρης',
                    'Артём Попов',
                    'Миша',
                    'Шаймарданов Максим',
                    '蔡查理',
                ]
            )
        )
        self.about.set_wrap_license(True)
        self.about.set_license(
            _(
                'This program is free software; you can redistribute it and/or '
                'modify it under the terms of the GNU General Public License as '
                'published by the Free Software Foundation; either version 3 of '
                'the License, or (at your option) any later version. \n\n'
                'This program '
                'is distributed in the hope that it will be useful, but WITHOUT '
                'ANY WARRANTY; without even the implied warranty of '
                'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU '
                'General Public License for more details. \n\n'
                'You should have received '
                'a copy of the GNU General Public License along with this program; '
                'if not, see <http://www.gnu.org/licenses>. \n\n'
                'In addition, as a '
                'special exception, the copyright holders give permission to link '
                'the code of portions of this program with the OpenSSL library. '
                'You must obey the GNU General Public License in all respects for '
                'all of the code used other than OpenSSL. \n\n'
                'If you modify file(s) '
                'with this exception, you may extend this exception to your '
                'version of the file(s), but you are not obligated to do so. If '
                'you do not wish to do so, delete this exception statement from '
                'your version. If you delete this exception statement from all '
                'source files in the program, then also delete it here.'
            )
        )
        self.about.set_website('http://deluge-torrent.org')
        self.about.set_website_label('deluge-torrent.org')

        self.about.set_icon(get_deluge_icon())
        self.about.set_logo(get_pixbuf('deluge-about.png'))

        if client.connected():
            if not client.is_standalone():
                self.about.set_comments(
                    self.about.get_comments() + _('Server:') + ' %coreversion%\n'
                )

            self.about.set_comments(
                self.about.get_comments() + '\n' + _('libtorrent:') + ' %ltversion%\n'
            )

            def on_lt_version(result):
                c = self.about.get_comments()
                c = c.replace('%ltversion%', result)
                self.about.set_comments(c)

            def on_info(result):
                c = self.about.get_comments()
                c = c.replace('%coreversion%', result)
                self.about.set_comments(c)
                client.core.get_libtorrent_version().addCallback(on_lt_version)

            if not client.is_standalone():
                client.daemon.info().addCallback(on_info)
            else:
                client.core.get_libtorrent_version().addCallback(on_lt_version)
コード例 #19
0
ファイル: _libtorrent.py プロジェクト: deluge-torrent/deluge
# -*- coding: utf-8 -*-
#
# Copyright (C) 2009 Andrew Resch <*****@*****.**>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#

"""
This module is used to handle the importing of libtorrent and also controls
the minimum versions of libtorrent that this version of Deluge supports.

Example:
    >>> from deluge._libtorrent import lt

"""
from __future__ import unicode_literals

from deluge.common import VersionSplit, get_version

try:
    import deluge.libtorrent as lt
except ImportError:
    import libtorrent as lt

REQUIRED_VERSION = '1.1.2.0'

if VersionSplit(lt.__version__) < VersionSplit(REQUIRED_VERSION):
    raise ImportError('Deluge %s requires libtorrent >= %s' % (get_version(), REQUIRED_VERSION))
コード例 #20
0
ファイル: aboutdialog.py プロジェクト: deluge-torrent/deluge
    def __init__(self):
        self.about = gtk.AboutDialog()
        self.about.set_transient_for(component.get('MainWindow').window)
        self.about.set_position(gtk.WIN_POS_CENTER)
        self.about.set_program_name(_('Deluge'))
        if windows_check():
            def url_hook(dialog, url):
                """Url hook for Windows OS which has no default browser."""
                open_url_in_browser(url)
                return True
            self.about.connect('activate-link', url_hook)

        version = get_version()

        self.about.set_copyright(
            _('Copyright %(year_start)s-%(year_end)s Deluge Team') % {'year_start': 2007, 'year_end': 2015})
        self.about.set_comments(
            _('A peer-to-peer file sharing program\nutilizing the BitTorrent protocol.') +
            '\n\n' + _('Client:') + ' %s\n' % version)
        self.about.set_version(version)
        self.about.set_authors([
            _('Current Developers:'), 'Andrew Resch', 'Damien Churchill',
            'John Garland', 'Calum Lind', '', 'libtorrent (libtorrent.org):',
            'Arvid Norberg', '', _('Past Developers or Contributors:'),
            'Zach Tibbitts', 'Alon Zakai', 'Marcos Mobley', 'Alex Dedul',
            'Sadrul Habib Chowdhury', 'Ido Abramovich', 'Martijn Voncken'
        ])
        self.about.set_artists(['Andrew Wedderburn', 'Andrew Resch'])
        self.about.set_translator_credits('\n'.join([
            'Aaron Wang Shi', 'abbigss', 'ABCdatos', 'Abcx', 'Actam', 'Adam',
            'adaminikisi', 'adi_oporanu', 'Adrian Goll', 'afby', 'Ahmades',
            'Ahmad Farghal', 'Ahmad Gharbeia أحمد غربية', 'akira', 'Aki Sivula',
            'Alan Pepelko', 'Alberto', 'Alberto Ferrer', 'alcatr4z', 'AlckO',
            'Aleksej Korgenkov', 'Alessio Treglia', 'Alexander Ilyashov',
            'Alexander Matveev', 'Alexander Saltykov', 'Alexander Taubenkorb',
            'Alexander Telenga', 'Alexander Yurtsev', 'Alexandre Martani',
            'Alexandre Rosenfeld', 'Alexandre Sapata Carbonell',
            'Alexey Osipov', 'Alin Claudiu Radut', 'allah', 'AlSim',
            'Alvaro Carrillanca P.', 'A.Matveev', 'Andras Hipsag',
            'András Kárász', 'Andrea Ratto', 'Andreas Johansson', 'Andreas Str',
            'André F. Oliveira', 'AndreiF', 'andrewh', 'Angel Guzman Maeso',
            'Aníbal Deboni Neto', 'animarval', 'Antonio Cono', 'antoniojreyes',
            'Anton Shestakov', 'Anton Yakutovich', 'antou',
            'Arkadiusz Kalinowski', 'Artin', 'artir', 'Astur',
            'Athanasios Lefteris', 'Athmane MOKRAOUI (ButterflyOfFire)',
            'Augusta Carla Klug', 'Avoledo Marco', 'axaard', 'AxelRafn',
            'Axezium', 'Ayont', 'b3rx', 'Bae Taegil', 'Bajusz Tamás',
            "Balaam's Miracle", 'Ballestein', 'Bent Ole Fosse', 'berto89',
            'bigx', 'Bjorn Inge Berg', 'blackbird', 'Blackeyed', 'blackmx',
            'BlueSky', 'Blutheo', 'bmhm', 'bob00work', 'boenki',
            'Bogdan Bădic-Spătariu', 'bonpu', 'Boone', 'boss01',
            'Branislav Jovanović', 'bronze', 'brownie', 'Brus46', 'bumper',
            'butely', 'BXCracer', 'c0nfidencal', 'Can Kaya',
            'Carlos Alexandro Becker', 'cassianoleal', 'Cédric.h',
            'César Rubén', 'chaoswizard', 'Chen Tao', 'chicha',
            'Chien Cheng Wei', 'Christian Kopac', 'Christian Widell',
            'Christoffer Brodd-Reijer', 'christooss', 'CityAceE', 'Clopy',
            'Clusty', 'cnu', 'Commandant', 'Constantinos Koniaris', 'Coolmax',
            'cosmix', 'Costin Chirvasuta', 'CoVaLiDiTy', 'cow_2001',
            'Crispin Kirchner', 'crom', 'Cruster', 'Cybolic', 'Dan Bishop',
            'Danek', 'Dani', 'Daniel Demarco', 'Daniel Ferreira',
            'Daniel Frank', 'Daniel Holm', 'Daniel Høyer Iversen',
            'Daniel Marynicz', 'Daniel Nylander', 'Daniel Patriche',
            'Daniel Schildt', 'Daniil Sorokin', 'Dante Díaz', 'Daria Michalska',
            'DarkenCZ', 'Darren', 'Daspah', 'David Eurenius', 'davidhjelm',
            'David Machakhelidze', 'Dawid Dziurdzia', 'Daya Adianto ', 'dcruz',
            'Deady', 'Dereck Wonnacott', 'Devgru', 'Devid Antonio Filoni'
            'DevilDogTG', 'di0rz`', 'Dialecti Valsamou', 'Diego Medeiros',
            'Dkzoffy', 'Dmitrij D. Czarkoff', 'Dmitriy Geels',
            'Dmitry Olyenyov', 'Dominik Kozaczko', 'Dominik Lübben', 'doomster',
            'Dorota Król', 'Doyen Philippe', 'Dread Knight', 'DreamSonic',
            'duan', 'Duong Thanh An', 'DvoglavaZver', 'dwori', 'dylansmrjones',
            'Ebuntor', 'Edgar Alejandro Jarquin Flores', 'Eetu', 'ekerazha',
            'Elias Julkunen', 'elparia', 'Emberke', 'Emiliano Goday Caneda',
            'EndelWar', 'eng.essam', 'enubuntu', 'ercangun', 'Erdal Ronahi',
            'ergin üresin', 'Eric', 'Éric Lassauge', 'Erlend Finvåg', 'Errdil',
            'ethan shalev', 'Evgeni Spasov', 'ezekielnin', 'Fabian Ordelmans',
            'Fabio Mazanatti', 'Fábio Nogueira', 'FaCuZ', 'Felipe Lerena',
            'Fernando Pereira', 'fjetland', 'Florian Schäfer', 'FoBoS', 'Folke',
            'Force', 'fosk', 'fragarray', 'freddeg', 'Frédéric Perrin',
            'Fredrik Kilegran', 'FreeAtMind', 'Fulvio Ciucci', 'Gabor Kelemen',
            'Galatsanos Panagiotis', 'Gaussian', 'gdevitis', 'Georg Brzyk',
            'George Dumitrescu', 'Georgi Arabadjiev', 'Georg Sieber',
            'Gerd Radecke', 'Germán Heusdens', 'Gianni Vialetto',
            'Gigih Aji Ibrahim', 'Giorgio Wicklein', 'Giovanni Rapagnani',
            'Giuseppe', 'gl', 'glen', 'granjerox', 'Green Fish', 'greentea',
            'Greyhound', 'G. U.', 'Guillaume BENOIT', 'Guillaume Pelletier',
            'Gustavo Henrique Klug', 'gutocarvalho', 'Guybrush88',
            'Hans Rødtang', 'HardDisk', 'Hargas Gábor',
            'Heitor Thury Barreiros Barbosa', 'helios91940', 'helix84',
            'Helton Rodrigues', 'Hendrik Luup', 'Henrique Ferreiro',
            'Henry Goury-Laffont', 'Hezy Amiel', 'hidro', 'hoball', 'hokten',
            'Holmsss', 'hristo.num', 'Hubert Życiński', 'Hyo', 'Iarwain', 'ibe',
            'ibear', 'Id2ndR', 'Igor Zubarev', 'IKON (Ion)', 'imen',
            'Ionuț Jula', 'Isabelle STEVANT', 'István Nyitrai', 'Ivan Petrovic',
            'Ivan Prignano', 'IvaSerge', 'jackmc', 'Jacks0nxD', 'Jack Shen',
            'Jacky Yeung', 'Jacques Stadler', 'Janek Thomaschewski', 'Jan Kaláb',
            'Jan Niklas Hasse', 'Jasper Groenewegen', 'Javi Rodríguez',
            'Jayasimha (ಜಯಸಿಂಹ)', 'jeannich', 'Jeff Bailes', 'Jesse Zilstorff',
            'Joan Duran', 'João Santos', 'Joar Bagge', 'Joe Anderson',
            'Joel Calado', 'Johan Linde', 'John Garland', 'Jojan', 'jollyr0ger',
            'Jonas Bo Grimsgaard', 'Jonas Granqvist', 'Jonas Slivka',
            'Jonathan Zeppettini', 'Jørgen', 'Jørgen Tellnes', 'josé',
            'José Geraldo Gouvêa', 'José Iván León Islas', 'José Lou C.',
            'Jose Sun', 'Jr.', 'Jukka Kauppinen', 'Julián Alarcón',
            'julietgolf', 'Jusic', 'Justzupi', 'Kaarel', 'Kai Thomsen',
            'Kalman Tarnay', 'Kamil Páral', 'Kane_F', '*****@*****.**',
            'Kateikyoushii', 'kaxhinaz', 'Kazuhiro NISHIYAMA', 'Kerberos',
            'Keresztes Ákos', 'kevintyk', 'kiersie', 'Kimbo^', 'Kim Lübbe',
            'kitzOgen', 'Kjetil Rydland', 'kluon', 'kmikz', 'Knedlyk',
            'koleoptero', 'Kőrösi Krisztián', 'Kouta', 'Krakatos',
            'Krešo Kunjas', 'kripken', 'Kristaps', 'Kristian Øllegaard',
            'Kristoffer Egil Bonarjee', 'Krzysztof Janowski',
            'Krzysztof Zawada', 'Larry Wei Liu', 'laughterwym', 'Laur Mõtus',
            'lazka', 'leandrud', 'lê bình', 'Le Coz Florent', 'Leo', 'liorda',
            'LKRaider', 'LoLo_SaG', 'Long Tran', 'Lorenz', 'Low Kian Seong',
            'Luca Andrea Rossi', 'Luca Ferretti', 'Lucky LIX', 'Luis Gomes',
            'Luis Reis', 'Łukasz Wyszyński', 'luojie-dune', 'maaark',
            'Maciej Chojnacki', 'Maciej Meller', 'Mads Peter Rommedahl',
            'Major Kong', 'Malaki', 'malde', 'Malte Lenz', 'Mantas Kriaučiūnas',
            'Mara Sorella', 'Marcin', 'Marcin Falkiewicz', 'marcobra',
            'Marco da Silva', 'Marco de Moulin', 'Marco Rodrigues', 'Marcos',
            'Marcos Escalier', 'Marcos Mobley', 'Marcus Ekstrom',
            'Marek Dębowski', 'Mário Buči', 'Mario Munda', 'Marius Andersen',
            'Marius Hudea', 'Marius Mihai', 'Mariusz Cielecki',
            'Mark Krapivner', 'marko-markovic', 'Markus Brummer',
            'Markus Sutter', 'Martin', 'Martin Dybdal', 'Martin Iglesias',
            'Martin Lettner', 'Martin Pihl', 'Masoud Kalali', 'mat02',
            'Matej Urbančič', 'Mathias-K', 'Mathieu Arès',
            'Mathieu D. (MatToufoutu)', 'Mathijs', 'Matrik', 'Matteo Renzulli',
            'Matteo Settenvini', 'Matthew Gadd', 'Matthias Benkard',
            'Matthias Mailänder', 'Mattias Ohlsson', 'Mauro de Carvalho',
            'Max Molchanov', 'Me', 'MercuryCC', 'Mert Bozkurt', 'Mert Dirik',
            'MFX', 'mhietar', 'mibtha', 'Michael Budde', 'Michael Kaliszka',
            'Michalis Makaronides', 'Michał Tokarczyk', 'Miguel Pires da Rosa',
            'Mihai Capotă', 'Miika Metsälä', 'Mikael Fernblad', 'Mike Sierra',
            'mikhalek', 'Milan Prvulović', 'Milo Casagrande', 'Mindaugas',
            'Miroslav Matejaš', 'misel', 'mithras', 'Mitja Pagon', 'M.Kitchen',
            'Mohamed Magdy', 'moonkey', 'MrBlonde', 'muczy', 'Münir Ekinci',
            'Mustafa Temizel', 'mvoncken', 'Mytonn', 'NagyMarton', 'neaion',
            'Neil Lin', 'Nemo', 'Nerijus Arlauskas', 'Nicklas Larsson',
            'Nicolaj Wyke', 'Nicola Piovesan', 'Nicolas Sabatier',
            'Nicolas Velin', 'Nightfall', 'NiKoB', 'Nikolai M. Riabov',
            'Niko_Thien', 'niska', 'Nithir', 'noisemonkey', 'nomemohes',
            'nosense', 'null', 'Nuno Estêvão', 'Nuno Santos', 'nxxs', 'nyo',
            'obo', 'Ojan', 'Olav Andreas Lindekleiv', 'oldbeggar',
            'Olivier FAURAX', 'orphe', 'osantana', 'Osman Tosun', 'OssiR',
            'otypoks', 'ounn', 'Oz123', 'Özgür BASKIN', 'Pablo Carmona A.',
            'Pablo Ledesma', 'Pablo Navarro Castillo', 'Paco Molinero',
            'Pål-Eivind Johnsen', 'pano', 'Paolo Naldini', 'Paracelsus',
            'Patryk13_03', 'Patryk Skorupa', 'PattogoTehen', 'Paul Lange',
            'Pavcio', 'Paweł Wysocki', 'Pedro Brites Moita',
            'Pedro Clemente Pereira Neto', 'Pekka "PEXI" Niemistö', 'Penegal',
            'Penzo', 'perdido', 'Peter Kotrcka', 'Peter Skov',
            'Peter Van den Bosch', 'Petter Eklund', 'Petter Viklund',
            'phatsphere', 'Phenomen', 'Philipi', 'Philippides Homer', 'phoenix',
            'pidi', 'Pierre Quillery', 'Pierre Rudloff', 'Pierre Slamich',
            'Pietrao', 'Piotr Strębski', 'Piotr Wicijowski', 'Pittmann Tamás',
            'Playmolas', 'Prescott', 'Prescott_SK', 'pronull',
            'Przemysław Kulczycki', 'Pumy', 'pushpika', 'PY', 'qubicllj',
            'r21vo', 'Rafał Barański', 'rainofchaos', 'Rajbir', 'ras0ir', 'Rat',
            'rd1381', 'Renato', 'Rene Hennig', 'Rene Pärts', 'Ricardo Duarte',
            'Richard', 'Robert Hrovat', 'Roberth Sjonøy', 'Robert Lundmark',
            'Robin Jakobsson', 'Robin Kåveland', 'Rodrigo Donado',
            'Roel Groeneveld', 'rohmaru', 'Rolf Christensen', 'Rolf Leggewie',
            'Roni Kantis', 'Ronmi', 'Rostislav Raykov', 'royto', 'RuiAmaro',
            'Rui Araújo', 'Rui Moura', 'Rune Svendsen', 'Rusna', 'Rytis',
            'Sabirov Mikhail', 'salseeg', 'Sami Koskinen', 'Samir van de Sand',
            'Samuel Arroyo Acuña', 'Samuel R. C. Vale', 'Sanel', 'Santi',
            'Santi Martínez Cantelli', 'Sardan', 'Sargate Kanogan',
            'Sarmad Jari', 'Saša Bodiroža', 'sat0shi', 'Saulius Pranckevičius',
            'Savvas Radevic', 'Sebastian Krauß', 'Sebastián Porta', 'Sedir',
            'Sefa Denizoğlu', 'sekolands', 'Selim Suerkan', 'semsomi',
            'Sergii Golovatiuk', 'setarcos', 'Sheki', 'Shironeko', 'Shlomil',
            'silfiriel', 'Simone Tolotti', 'Simone Vendemia', 'sirkubador',
            'Sławomir Więch', 'slip', 'slyon', 'smoke', 'Sonja', 'spectral',
            'spin_555', 'spitf1r3', 'Spiziuz', 'Spyros Theodoritsis', 'SqUe',
            'Squigly', 'srtck', 'Stefan Horning', 'Stefano Maggiolo',
            'Stefano Roberto Soleti', 'steinberger', 'Stéphane Travostino',
            'Stephan Klein', 'Steven De Winter', 'Stevie', 'Stian24', 'stylius',
            'Sukarn Maini', 'Sunjae Park', 'Susana Pereira', 'szymon siglowy',
            'takercena', 'TAS', 'Taygeto', 'temy4', 'texxxxxx', 'thamood',
            'Thanos Chatziathanassiou', 'Tharawut Paripaiboon', 'Theodoor',
            'Théophane Anestis', 'Thor Marius K. Høgås', 'Tiago Silva',
            'Tiago Sousa', 'Tikkel', 'tim__b', 'Tim Bordemann', 'Tim Fuchs',
            'Tim Kornhammar', 'Timo', 'Timo Jyrinki', 'Timothy Babych',
            'TitkosRejtozo', 'Tom', 'Tomas Gustavsson', 'Tomas Valentukevičius',
            'Tomasz Dominikowski', 'Tomislav Plavčić', 'Tom Mannerhagen',
            'Tommy Mikkelsen', 'Tom Verdaat', 'Tony Manco',
            'Tor Erling H. Opsahl', 'Toudi', 'tqm_z', 'Trapanator', 'Tribaal',
            'Triton', 'TuniX12', 'Tuomo Sipola', 'turbojugend_gr', 'Turtle.net',
            'twilight', 'tymmej', 'Ulrik', 'Umarzuki Mochlis', 'unikob',
            'Vadim Gusev', 'Vagi', 'Valentin Bora', 'Valmantas Palikša',
            'VASKITTU', 'Vassilis Skoullis', 'vetal17', 'vicedo', 'viki',
            'villads hamann', 'Vincent Garibal', 'Vincent Ortalda', 'vinchi007',
            'Vinícius de Figueiredo Silva', 'Vinzenz Vietzke', 'virtoo',
            'virtual_spirit', 'Vitor Caike', 'Vitor Lamas Gatti',
            'Vladimir Lazic', 'Vladimir Sharshov', 'Wanderlust', 'Wander Nauta',
            'Ward De Ridder', 'WebCrusader', 'webdr', 'Wentao Tang', 'wilana',
            'Wilfredo Ernesto Guerrero Campos', 'Wim Champagne', 'World Sucks',
            'Xabi Ezpeleta', 'Xavi de Moner', 'XavierToo', 'XChesser',
            'Xiaodong Xu', 'xyb', 'Yaron', 'Yasen Pramatarov', 'YesPoX',
            'Yuren Ju', 'Yves MATHIEU', 'zekopeko', 'zhuqin', 'Zissan',
            'Γιάννης Κατσαμπίρης', 'Артём Попов', 'Миша', 'Шаймарданов Максим',
            '蔡查理'
        ]))
        self.about.set_wrap_license(True)
        self.about.set_license(_(
            'This program is free software; you can redistribute it and/or '
            'modify it under the terms of the GNU General Public License as '
            'published by the Free Software Foundation; either version 3 of '
            'the License, or (at your option) any later version. \n\n'
            'This program '
            'is distributed in the hope that it will be useful, but WITHOUT '
            'ANY WARRANTY; without even the implied warranty of '
            'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU '
            'General Public License for more details. \n\n'
            'You should have received '
            'a copy of the GNU General Public License along with this program; '
            'if not, see <http://www.gnu.org/licenses>. \n\n'
            'In addition, as a '
            'special exception, the copyright holders give permission to link '
            'the code of portions of this program with the OpenSSL library. '
            'You must obey the GNU General Public License in all respects for '
            'all of the code used other than OpenSSL. \n\n'
            'If you modify file(s) '
            'with this exception, you may extend this exception to your '
            'version of the file(s), but you are not obligated to do so. If '
            'you do not wish to do so, delete this exception statement from '
            'your version. If you delete this exception statement from all '
            'source files in the program, then also delete it here.'
        ))
        self.about.set_website('http://deluge-torrent.org')
        self.about.set_website_label('deluge-torrent.org')

        self.about.set_icon(get_deluge_icon())
        self.about.set_logo(get_pixbuf('deluge-about.png'))

        if client.connected():
            if not client.is_standalone():
                self.about.set_comments(
                    self.about.get_comments() + _('Server:') + ' %coreversion%\n')

            self.about.set_comments(
                self.about.get_comments() + '\n' + _('libtorrent:') + ' %ltversion%\n')

            def on_lt_version(result):
                c = self.about.get_comments()
                c = c.replace('%ltversion%', result)
                self.about.set_comments(c)

            def on_info(result):
                c = self.about.get_comments()
                c = c.replace('%coreversion%', result)
                self.about.set_comments(c)
                client.core.get_libtorrent_version().addCallback(on_lt_version)

            if not client.is_standalone():
                client.daemon.info().addCallback(on_info)
            else:
                client.core.get_libtorrent_version().addCallback(on_lt_version)
コード例 #21
0
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#

"""
This module is used to handle the importing of libtorrent and also controls
the minimum versions of libtorrent that this version of Deluge supports.

Example:
    >>> from deluge._libtorrent import lt

"""
from __future__ import unicode_literals

from deluge.common import VersionSplit, get_version

try:
    import deluge.libtorrent as lt
except ImportError:
    import libtorrent as lt

REQUIRED_VERSION = '1.1.2.0'
LT_VERSION = lt.__version__

if VersionSplit(LT_VERSION) < VersionSplit(REQUIRED_VERSION):
    raise ImportError(
        'Deluge %s requires libtorrent >= %s' % (get_version(), REQUIRED_VERSION)
    )
コード例 #22
0
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
"""
This module is used to handle the importing of libtorrent and also controls
the minimum versions of libtorrent that this version of Deluge supports.

Example:
    >>> from deluge._libtorrent import lt

"""
from __future__ import unicode_literals

from deluge.common import VersionSplit, get_version
from deluge.error import LibtorrentImportError

try:
    import deluge.libtorrent as lt
except ImportError:
    try:
        import libtorrent as lt
    except ImportError as ex:
        raise LibtorrentImportError('No libtorrent library found: %s' % (ex))

REQUIRED_VERSION = '1.1.2.0'
LT_VERSION = lt.__version__

if VersionSplit(LT_VERSION) < VersionSplit(REQUIRED_VERSION):
    raise LibtorrentImportError('Deluge %s requires libtorrent >= %s' %
                                (get_version(), REQUIRED_VERSION))
コード例 #23
0
ファイル: daemon.py プロジェクト: doadin/deluge
 def get_version(self):
     """Returns the daemon version"""
     return get_version()
コード例 #24
0
ファイル: log.py プロジェクト: orther/Deluge
#
#
"""Logging functions"""

import os
import inspect
import logging
from deluge import common
from twisted.internet import defer
from twisted.python.log import PythonLoggingObserver

__all__ = ["setupLogger", "setLoggerLevel", "getPluginLogger", "LOG"]

LoggingLoggerClass = logging.getLoggerClass()

if 'dev' in common.get_version():
    DEFAULT_LOGGING_FORMAT = "%%(asctime)s.%%(msecs)03.0f [%%(levelname)-8s][%%(name)-%ds:%%(lineno)-4d] %%(message)s"
else:
    DEFAULT_LOGGING_FORMAT = "%%(asctime)s [%%(levelname)-8s][%%(name)-%ds] %%(message)s"
MAX_LOGGER_NAME_LENGTH = 3


class Logging(LoggingLoggerClass):
    def __init__(self, logger_name):
        LoggingLoggerClass.__init__(self, logger_name)

        # This makes module name padding increase to the biggest module name
        # so that logs keep readability.
        global MAX_LOGGER_NAME_LENGTH
        if len(logger_name) > MAX_LOGGER_NAME_LENGTH:
            MAX_LOGGER_NAME_LENGTH = len(logger_name)
コード例 #25
0
ファイル: log.py プロジェクト: s0undt3ch/Deluge
#

"""Logging functions"""

import os
import inspect
import logging
from deluge import common
from twisted.internet import defer
from twisted.python.log import PythonLoggingObserver

__all__ = ["setupLogger", "setLoggerLevel", "getPluginLogger", "LOG"]

LoggingLoggerClass = logging.getLoggerClass()

if 'dev' in common.get_version():
    DEFAULT_LOGGING_FORMAT = "%%(asctime)s.%%(msecs)03.0f [%%(levelname)-8s][%%(name)-%ds:%%(lineno)-4d] %%(message)s"
else:
    DEFAULT_LOGGING_FORMAT = "%%(asctime)s [%%(levelname)-8s][%%(name)-%ds] %%(message)s"
MAX_LOGGER_NAME_LENGTH = 3

class Logging(LoggingLoggerClass):
    def __init__(self, logger_name):
        LoggingLoggerClass.__init__(self, logger_name)

        # This makes module name padding increase to the biggest module name
        # so that logs keep readability.
        global MAX_LOGGER_NAME_LENGTH
        if len(logger_name) > MAX_LOGGER_NAME_LENGTH:
            MAX_LOGGER_NAME_LENGTH = len(logger_name)
            for handler in logging.getLogger().handlers: