mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Advertise the calibre content server for Stanza via BonJour, needs testing
This commit is contained in:
parent
322d600786
commit
b0698d3fd5
@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
|
||||
HTTP server for remote access to the calibre database.
|
||||
'''
|
||||
|
||||
import sys, textwrap, operator, os, re, logging
|
||||
import sys, textwrap, operator, os, re, logging, subprocess
|
||||
from itertools import repeat
|
||||
from logging.handlers import RotatingFileHandler
|
||||
from datetime import datetime
|
||||
@ -171,6 +171,12 @@ class LibraryServer(object):
|
||||
try:
|
||||
cherrypy.engine.start()
|
||||
self.is_running = True
|
||||
try:
|
||||
subprocess.Popen(('dns-sd -R "calibre Books" '
|
||||
'_stanza._tcp local %d')%
|
||||
self.opts.port, shell=True)
|
||||
except:
|
||||
pass
|
||||
cherrypy.engine.block()
|
||||
except Exception, e:
|
||||
self.exception = e
|
||||
|
Loading…
x
Reference in New Issue
Block a user