[#3055|GTKUI] Fix unable to auto-start localhost daemon
This commit is contained in:
parent
131b9f86a9
commit
d372be9b65
|
@ -23,7 +23,7 @@ from deluge.error import AuthenticationRequired, BadLoginError, IncompatibleClie
|
|||
from deluge.ui.client import Client, client
|
||||
from deluge.ui.gtkui.common import get_clipboard_text
|
||||
from deluge.ui.gtkui.dialogs import AuthenticationDialog, ErrorDialog
|
||||
from deluge.ui.hostlist import DEFAULT_PORT, HostList
|
||||
from deluge.ui.hostlist import DEFAULT_PORT, LOCALHOST, HostList
|
||||
|
||||
try:
|
||||
from urllib.parse import urlparse
|
||||
|
@ -41,8 +41,6 @@ HOSTLIST_COL_PASS = 4
|
|||
HOSTLIST_COL_STATUS = 5
|
||||
HOSTLIST_COL_VERSION = 6
|
||||
|
||||
LOCALHOST = ('127.0.0.1', 'localhost')
|
||||
|
||||
HOSTLIST_PIXBUFS = [
|
||||
# This is populated in ConnectionManager.show
|
||||
]
|
||||
|
|
|
@ -40,6 +40,7 @@ from deluge.common import fsize, fspeed, get_default_download_dir, osx_check, wi
|
|||
from deluge.configmanager import ConfigManager, get_config_dir
|
||||
from deluge.error import DaemonRunningError
|
||||
from deluge.ui.client import client
|
||||
from deluge.ui.hostlist import LOCALHOST
|
||||
from deluge.ui.gtkui.addtorrentdialog import AddTorrentDialog
|
||||
from deluge.ui.gtkui.common import associate_magnet_links
|
||||
from deluge.ui.gtkui.connectionmanager import ConnectionManager
|
||||
|
@ -340,7 +341,7 @@ class GtkUI(object):
|
|||
if self.config['autostart_localhost']:
|
||||
port = 0
|
||||
for host_config in self.connectionmanager.hostlist.config['hosts']:
|
||||
if host_config[1] in self.connectionmanager.LOCALHOST:
|
||||
if host_config[1] in LOCALHOST:
|
||||
port = host_config[2]
|
||||
log.debug('Autostarting localhost: %s', host_config[0:3])
|
||||
|
||||
|
|
Loading…
Reference in New Issue