Get rid fo the last use of the old server code

This commit is contained in:
Kovid Goyal 2017-04-11 20:13:01 +05:30
parent b9db2663f8
commit 01b69ae781
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 8 deletions

View File

@ -13,7 +13,6 @@ from calibre.constants import get_osx_version, isosx, iswindows
from calibre.gui2 import info_dialog, question_dialog
from calibre.gui2.actions import InterfaceAction
from calibre.gui2.dialogs.smartdevice import SmartdeviceDialog
from calibre.utils.config import tweaks
from calibre.utils.icu import primary_sort_key
from calibre.utils.smtp import config as email_config
@ -77,13 +76,12 @@ class ShareConnMenu(QMenu): # {{{
from calibre.utils.mdns import get_external_ip, verify_ipV4_address
text = _('Start Content server')
if running:
listen_on = (verify_ipV4_address(tweaks['server_listen_on']) or
get_external_ip())
from calibre.srv.opts import server_config
opts = server_config()
listen_on = verify_ipV4_address(opts.listen_on) or get_external_ip()
try:
from calibre.library.server import server_config as content_server_config
cs_port = content_server_config().parse().port
ip_text = _(' [%(ip)s, port %(port)d]')%dict(ip=listen_on,
port=cs_port)
ip_text = _(' [%(ip)s, port %(port)d]')%dict(
ip=listen_on, port=opts.port)
except Exception:
ip_text = ' [%s]'%listen_on
text = _('Stop Content server') + ip_text

View File

@ -1,3 +1,3 @@
Rewrite server integration with nginx/apache section
Grep for from library.server and port all code that uses it
grep src/calibre/srv and src/pyj for TODO