From ee00a74d416b01c57b6e7012726a5bea818ee760 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 18 Jun 2017 06:21:23 +0100 Subject: [PATCH] Fix chords and display --- openlp/core/api/endpoint/core.py | 9 +++++++++ openlp/core/api/http/server.py | 3 ++- openlp/plugins/remotes/remoteplugin.py | 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/openlp/core/api/endpoint/core.py b/openlp/core/api/endpoint/core.py index 3b9a326c9..8ecdbc633 100644 --- a/openlp/core/api/endpoint/core.py +++ b/openlp/core/api/endpoint/core.py @@ -35,6 +35,7 @@ blank_dir = os.path.join(static_dir, 'index') log = logging.getLogger(__name__) +chords_endpoint = Endpoint('chords', template_dir=template_dir, static_dir=static_dir) stage_endpoint = Endpoint('stage', template_dir=template_dir, static_dir=static_dir) main_endpoint = Endpoint('main', template_dir=template_dir, static_dir=static_dir) blank_endpoint = Endpoint('', template_dir=template_dir, static_dir=blank_dir) @@ -92,6 +93,14 @@ def stage_index(request): return stage_endpoint.render_template('stage.mako', **TRANSLATED_STRINGS) +@chords_endpoint.route('') +def chords_index(request): + """ + Deliver the page for the /chords url + """ + return chords_endpoint.render_template('chords.mako', **TRANSLATED_STRINGS) + + @main_endpoint.route('') def main_index(request): """ diff --git a/openlp/core/api/http/server.py b/openlp/core/api/http/server.py index 3425cecad..a7ec34903 100644 --- a/openlp/core/api/http/server.py +++ b/openlp/core/api/http/server.py @@ -35,7 +35,7 @@ from openlp.core.api.http import application from openlp.core.common import RegistryMixin, RegistryProperties, OpenLPMixin, Settings, Registry from openlp.core.api.poll import Poller from openlp.core.api.endpoint.controller import controller_endpoint, api_controller_endpoint -from openlp.core.api.endpoint.core import stage_endpoint, blank_endpoint, main_endpoint +from openlp.core.api.endpoint.core import chords_endpoint, stage_endpoint, blank_endpoint, main_endpoint from openlp.core.api.endpoint.service import service_endpoint, api_service_endpoint log = logging.getLogger(__name__) @@ -89,6 +89,7 @@ class HttpServer(RegistryMixin, RegistryProperties, OpenLPMixin): application.initialise() register_endpoint(controller_endpoint) register_endpoint(api_controller_endpoint) + register_endpoint(chords_endpoint) register_endpoint(stage_endpoint) register_endpoint(blank_endpoint) register_endpoint(main_endpoint) diff --git a/openlp/plugins/remotes/remoteplugin.py b/openlp/plugins/remotes/remoteplugin.py index 43e3d08ff..fd171e6d3 100644 --- a/openlp/plugins/remotes/remoteplugin.py +++ b/openlp/plugins/remotes/remoteplugin.py @@ -22,6 +22,7 @@ import logging import os +import time from PyQt5 import QtCore, QtWidgets @@ -96,9 +97,14 @@ class RemotesPlugin(Plugin, OpenLPMixin): self.application.process_events() progress = Progress(self) progress.forceShow() + self.application.process_events() + time.sleep(1) download_and_check(progress) self.application.process_events() + time.sleep(1) progress.close() + self.application.process_events() + aa = Registry().get('website_version') Settings().setValue('remotes/download version', Registry().get('website_version')) def website_version(self):