mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Minor tidyup of core code
This commit is contained in:
parent
6c295cd314
commit
ccec01b729
1 changed files with 8 additions and 8 deletions
|
@ -72,18 +72,18 @@ log = logging.getLogger(__name__)
|
||||||
|
|
||||||
class Core(component.Component):
|
class Core(component.Component):
|
||||||
def __init__(self, listen_interface=None):
|
def __init__(self, listen_interface=None):
|
||||||
log.debug("Core init..")
|
log.debug("Core init...")
|
||||||
component.Component.__init__(self, "Core")
|
component.Component.__init__(self, "Core")
|
||||||
|
|
||||||
# Start the libtorrent session
|
|
||||||
log.info("Starting libtorrent %s session..", lt.version)
|
|
||||||
|
|
||||||
# Create the client fingerprint
|
# Create the client fingerprint
|
||||||
version = deluge.common.VersionSplit(deluge.common.get_version()).version
|
client_id = "DE"
|
||||||
while len(version) < 4:
|
client_version = deluge.common.VersionSplit(deluge.common.get_version()).version
|
||||||
version.append(0)
|
while len(client_version) < 4:
|
||||||
|
client_version.append(0)
|
||||||
|
|
||||||
self.session = lt.session(lt.fingerprint("DE", *version), flags=0)
|
# Start the libtorrent session
|
||||||
|
log.info("Starting libtorrent %s (%s, %s) session...", lt.version, client_id, client_version)
|
||||||
|
self.session = lt.session(lt.fingerprint(client_id, *client_version), flags=0)
|
||||||
|
|
||||||
# Load the session state if available
|
# Load the session state if available
|
||||||
self.__load_session_state()
|
self.__load_session_state()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue