mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Get rid fo the last use of the old server code
This commit is contained in:
parent
b9db2663f8
commit
01b69ae781
@ -13,7 +13,6 @@ from calibre.constants import get_osx_version, isosx, iswindows
|
|||||||
from calibre.gui2 import info_dialog, question_dialog
|
from calibre.gui2 import info_dialog, question_dialog
|
||||||
from calibre.gui2.actions import InterfaceAction
|
from calibre.gui2.actions import InterfaceAction
|
||||||
from calibre.gui2.dialogs.smartdevice import SmartdeviceDialog
|
from calibre.gui2.dialogs.smartdevice import SmartdeviceDialog
|
||||||
from calibre.utils.config import tweaks
|
|
||||||
from calibre.utils.icu import primary_sort_key
|
from calibre.utils.icu import primary_sort_key
|
||||||
from calibre.utils.smtp import config as email_config
|
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
|
from calibre.utils.mdns import get_external_ip, verify_ipV4_address
|
||||||
text = _('Start Content server')
|
text = _('Start Content server')
|
||||||
if running:
|
if running:
|
||||||
listen_on = (verify_ipV4_address(tweaks['server_listen_on']) or
|
from calibre.srv.opts import server_config
|
||||||
get_external_ip())
|
opts = server_config()
|
||||||
|
listen_on = verify_ipV4_address(opts.listen_on) or get_external_ip()
|
||||||
try:
|
try:
|
||||||
from calibre.library.server import server_config as content_server_config
|
ip_text = _(' [%(ip)s, port %(port)d]')%dict(
|
||||||
cs_port = content_server_config().parse().port
|
ip=listen_on, port=opts.port)
|
||||||
ip_text = _(' [%(ip)s, port %(port)d]')%dict(ip=listen_on,
|
|
||||||
port=cs_port)
|
|
||||||
except Exception:
|
except Exception:
|
||||||
ip_text = ' [%s]'%listen_on
|
ip_text = ' [%s]'%listen_on
|
||||||
text = _('Stop Content server') + ip_text
|
text = _('Stop Content server') + ip_text
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
Rewrite server integration with nginx/apache section
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user