fix up change to xdb and handle missing remotes directories

This commit is contained in:
Tim Bentley 2017-03-04 09:45:14 +00:00
parent 5d917de2f8
commit 8b0f64317c
5 changed files with 17 additions and 6 deletions

View File

@ -5,7 +5,7 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2016 OpenLP Developers #
# Copyright (c) 2008-2017 OpenLP Developers #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #

View File

@ -516,8 +516,8 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, RegistryProperties):
Settings().set_up_default_values()
self.about_form = AboutForm(self)
MediaController()
websockets.WebSocketServer()
server.HttpServer()
# websockets.WebSocketServer()
# server.HttpServer()
SettingsForm(self)
self.formatting_tag_form = FormattingTagForm(self)
self.shortcut_form = ShortcutListForm(self)

View File

@ -4,7 +4,7 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2016 OpenLP Developers #
# Copyright (c) 2008-2017 OpenLP Developers #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #

View File

@ -4,7 +4,7 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2016 OpenLP Developers #
# Copyright (c) 2008-2017 OpenLP Developers #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #

View File

@ -21,9 +21,10 @@
###############################################################################
import logging
import os
from openlp.core.api.http import register_endpoint
from openlp.core.common import OpenLPMixin
from openlp.core.common import AppLocation, OpenLPMixin, check_directory_exists
from openlp.core.common.httputils import get_web_page
from openlp.core.lib import Plugin, StringContent, translate, build_icon
from openlp.plugins.remotes.lib import RemotesTab
@ -58,6 +59,16 @@ class RemotesPlugin(Plugin, OpenLPMixin):
'download as well as custom developed interfaces')
return about_text
def initialise(self):
"""
Create the internal file structure if it does not exist
:return:
"""
check_directory_exists(os.path.join(AppLocation.get_section_data_path('remotes'), 'assets'))
check_directory_exists(os.path.join(AppLocation.get_section_data_path('remotes'), 'images'))
check_directory_exists(os.path.join(AppLocation.get_section_data_path('remotes'), 'static'))
check_directory_exists(os.path.join(AppLocation.get_section_data_path('remotes'), 'templates'))
def set_plugin_text_strings(self):
"""
Called to define all translatable texts of the plugin