Fix chords and display

This commit is contained in:
Tim Bentley 2017-06-18 06:21:23 +01:00
parent 8a2d043862
commit ee00a74d41
3 changed files with 17 additions and 1 deletions

View File

@ -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):
"""

View File

@ -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)

View File

@ -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):