mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-02 17:33:32 +02:00
Add a warning about content server needing re-configuration the first time it is started
This commit is contained in:
parent
4a0db45362
commit
7bd2c5d9ed
1 changed files with 13 additions and 1 deletions
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
from calibre import prints, force_unicode, detect_ncpus
|
||||
from calibre.constants import (
|
||||
__appname__, isosx, iswindows, filesystem_encoding, DEBUG)
|
||||
__appname__, isosx, iswindows, filesystem_encoding, DEBUG, config_dir)
|
||||
from calibre.utils.config import prefs, dynamic
|
||||
from calibre.utils.ipc.pool import Pool
|
||||
from calibre.db.legacy import LibraryDatabase
|
||||
|
|
@ -475,6 +475,18 @@ def start_smartdevice(self):
|
|||
|
||||
def start_content_server(self, check_started=True):
|
||||
from calibre.srv.embedded import Server
|
||||
if not gprefs.get('server3_warning_done', False):
|
||||
gprefs.set('server3_warning_done', True)
|
||||
if os.path.exists(os.path.join(config_dir, 'server.py')):
|
||||
try:
|
||||
os.remove(os.path.join(config_dir, 'server.py'))
|
||||
except EnvironmentError:
|
||||
pass
|
||||
warning_dialog(self, _('Content server changed!'), _(
|
||||
'calibre 3 comes with a completely re-written content server.'
|
||||
' As such any custom configuration you have for the content'
|
||||
' server no longer applies. You should check and refresh your'
|
||||
' settings in Preferences->Sharing->Sharing over the net'), show=True)
|
||||
self.content_server = Server(self.library_broker, Dispatcher(self.handle_changes_from_server))
|
||||
self.content_server.state_callback = Dispatcher(
|
||||
self.iactions['Connect Share'].content_server_state_changed)
|
||||
|
|
|
|||
Loading…
Reference in a new issue