forked from openlp/openlp
Finish signal refactor
This commit is contained in:
parent
877af7ea2c
commit
fa54f94905
@ -35,17 +35,80 @@ class EventReceiver(QtCore.QObject):
|
||||
system. This is a private class and should not be used directly
|
||||
but rather via the Receiver class.
|
||||
|
||||
``stop_import``
|
||||
Stops the Bible Import
|
||||
|
||||
``pre_load_bibles``
|
||||
Triggers the plugin to relaod the bible lists
|
||||
|
||||
``process_events``
|
||||
``openlp_process_events``
|
||||
Requests the Application to flush the events queue
|
||||
|
||||
``{plugin}_add_service_item``
|
||||
ask the plugin to push the selected items to the service item
|
||||
``openlp_version_check``
|
||||
Version has changed so pop up window.
|
||||
|
||||
``config_updated``
|
||||
Informs components the config has changed
|
||||
|
||||
``config_screen_changed``
|
||||
The display monitor has been changed
|
||||
|
||||
``slidecontroller_{live|preview}_first``
|
||||
Moves to the first slide
|
||||
|
||||
``slidecontroller_{live|preview}_next``
|
||||
Moves to the next slide
|
||||
|
||||
``slidecontroller_{live|preview}_next_noloop``
|
||||
Moves to the next slide without auto advance
|
||||
|
||||
``slidecontroller_{live|preview}_previous``
|
||||
Moves to the previous slide
|
||||
|
||||
``slidecontroller_{live|preview}_previous_noloop``
|
||||
Moves to the previous slide, without auto advance
|
||||
|
||||
``slidecontroller_{live|preview}_last``
|
||||
Moves to the last slide
|
||||
|
||||
``slidecontroller_{live|preview}_started``
|
||||
Broadcasts that an item has been made live/previewed
|
||||
|
||||
``slidecontroller_{live|preview}_change``
|
||||
Informs the slidecontroller that a slide change has occurred
|
||||
|
||||
``slidecontroller_live_spin_delay``
|
||||
Pushes out the loop delay
|
||||
|
||||
``slidecontroller_live_stop_loop``
|
||||
Stop the loop on the main display
|
||||
|
||||
``servicecontroller_next_item``
|
||||
Display the next item in the service
|
||||
|
||||
``maindisplay_blank``
|
||||
Blank the maindisplay window
|
||||
|
||||
``maindisplay_hide``
|
||||
Hide the maindisplay window
|
||||
|
||||
``maindisplay_show``
|
||||
Return the maindisplay window
|
||||
|
||||
``maindisplay_active``
|
||||
The maindisplay has been made active
|
||||
|
||||
``maindisplay_status_text``
|
||||
Changes the bottom status bar text on the maindisplay window
|
||||
|
||||
``maindisplay_blank_check``
|
||||
Check to see if the blank display message is required
|
||||
|
||||
``videodisplay_start``
|
||||
Open a media item and prepare for playing
|
||||
|
||||
``videodisplay_play``
|
||||
Start playing a media item
|
||||
|
||||
``videodisplay_pause``
|
||||
Pause a media item
|
||||
|
||||
``videodisplay_stop``
|
||||
Stop playing a media item
|
||||
|
||||
``theme_update_list``
|
||||
send out message with new themes
|
||||
@ -53,18 +116,6 @@ class EventReceiver(QtCore.QObject):
|
||||
``theme_update_global``
|
||||
Tell the components we have a new global theme
|
||||
|
||||
``load_song_list``
|
||||
Tells the the song plugin to reload the song list
|
||||
|
||||
``load_custom_list``
|
||||
Tells the the custom plugin to reload the custom list
|
||||
|
||||
``update_spin_delay``
|
||||
Pushes out the Image loop delay
|
||||
|
||||
``request_spin_delay``
|
||||
Requests a spin delay
|
||||
|
||||
``{plugin}_start``
|
||||
Requests a plugin to start a external program
|
||||
Path and file provided in message
|
||||
@ -81,42 +132,47 @@ class EventReceiver(QtCore.QObject):
|
||||
``{plugin}_last``
|
||||
Requests a plugin to handle a last event
|
||||
|
||||
``{plugin}_slide``
|
||||
Requests a plugin to handle a go to specific slide event
|
||||
|
||||
``{plugin}_stop``
|
||||
Requests a plugin to handle a stop event
|
||||
|
||||
``{plugin}_blank``
|
||||
Requests a plugin to handle a blank screen event
|
||||
|
||||
``{plugin}_unblank``
|
||||
Requests a plugin to handle an unblank screen event
|
||||
|
||||
``{plugin}_edit``
|
||||
Requests a plugin edit a database item with the key as the payload
|
||||
|
||||
``songusage_live``
|
||||
Sends live song audit requests to the audit component
|
||||
``{plugin}_edit_clear``
|
||||
Editing has been completed
|
||||
|
||||
``audit_changed``
|
||||
Audit information may have changed
|
||||
``{plugin}_load_list``
|
||||
Tells the the plugin to reload the media manager list
|
||||
|
||||
``config_updated``
|
||||
Informs components the config has changed
|
||||
``{plugin}_preview``
|
||||
Tells the plugin it's item can be previewed
|
||||
|
||||
``preview_song``
|
||||
Tells the song plugin the edit has finished and the song can be previewed
|
||||
Only available if the edit was triggered by the Preview button.
|
||||
``{plugin}_add_service_item``
|
||||
Ask the plugin to push the selected items to the service item
|
||||
|
||||
``slidecontroller_change``
|
||||
Informs the slidecontroller that a slide change has occurred
|
||||
``alerts_text``
|
||||
Displays an alert message
|
||||
|
||||
``bibles_nobook``
|
||||
Attempt to find book resulted in no match
|
||||
|
||||
``remote_edit_clear``
|
||||
Informs all components that remote edit has been aborted.
|
||||
``bibles_showprogress``
|
||||
Show progress of bible verse import
|
||||
|
||||
``presentation types``
|
||||
Informs all components of the presentation types supported.
|
||||
``bibles_hideprogress``
|
||||
Hide progress of bible verse import
|
||||
|
||||
``blank_check``
|
||||
Check to see if th eblank display message is required
|
||||
|
||||
``version_check``
|
||||
Version has changed so pop up window.
|
||||
|
||||
``mainDisplay_active``
|
||||
Version has changed so pop up window.
|
||||
``bibles_stop_import``
|
||||
Stops the Bible Import
|
||||
|
||||
"""
|
||||
def __init__(self):
|
||||
@ -172,4 +228,4 @@ class Receiver():
|
||||
"""
|
||||
Get the global ``eventreceiver`` instance.
|
||||
"""
|
||||
return Receiver.eventreceiver
|
||||
return Receiver.eventreceiver
|
||||
|
@ -422,12 +422,13 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
else:
|
||||
#Is it posssible to process multiple list items to generate multiple
|
||||
#service items?
|
||||
if self.singleServiceItem:
|
||||
if self.singleServiceItem or self.remoteTriggered:
|
||||
log.debug(self.PluginNameShort + u' Add requested')
|
||||
service_item = self.buildServiceItem()
|
||||
if service_item:
|
||||
service_item.from_plugin = False
|
||||
self.parent.service_manager.addServiceItem(service_item)
|
||||
self.parent.service_manager.addServiceItem(service_item,
|
||||
replace=self.remoteTriggered)
|
||||
else:
|
||||
items = self.ListView.selectedIndexes()
|
||||
for item in items:
|
||||
|
@ -138,7 +138,7 @@ class MainDisplay(DisplayWidget):
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'maindisplay_show'), self.showDisplay)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_live_mediastart'), self.hideDisplay)
|
||||
QtCore.SIGNAL(u'videodisplay_start'), self.hideDisplay)
|
||||
|
||||
def setup(self):
|
||||
"""
|
||||
@ -195,7 +195,7 @@ class MainDisplay(DisplayWidget):
|
||||
|
||||
def resetDisplay(self):
|
||||
log.debug(u'resetDisplay')
|
||||
Receiver.send_message(u'maindisplay_stop_loop')
|
||||
Receiver.send_message(u'slidecontroller_live_stop_loop')
|
||||
if self.primary:
|
||||
self.setVisible(False)
|
||||
else:
|
||||
@ -325,13 +325,13 @@ class VideoDisplay(Phonon.VideoWidget):
|
||||
Phonon.createPath(self.mediaObject, self)
|
||||
Phonon.createPath(self.mediaObject, self.audioObject)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'mediacontroller_start'), self.onMediaQueue)
|
||||
QtCore.SIGNAL(u'videodisplay_start'), self.onMediaQueue)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'mediacontroller_play'), self.onMediaPlay)
|
||||
QtCore.SIGNAL(u'videodisplay_play'), self.onMediaPlay)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'mediacontroller_pause'), self.onMediaPause)
|
||||
QtCore.SIGNAL(u'videodisplay_pause'), self.onMediaPause)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'mediacontroller_stop'), self.onMediaStop)
|
||||
QtCore.SIGNAL(u'videodisplay_stop'), self.onMediaStop)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'config_updated'), self.setup)
|
||||
|
||||
@ -364,40 +364,29 @@ class VideoDisplay(Phonon.VideoWidget):
|
||||
self.primary = True
|
||||
|
||||
def onMediaQueue(self, message):
|
||||
if not message[1]:
|
||||
return
|
||||
log.debug(u'VideoDisplay Queue new media message %s' % message)
|
||||
file = os.path.join(message[0].get_frame_path(),
|
||||
message[0].get_frame_title())
|
||||
#file = os.path.join(message[1], message[2])
|
||||
source = self.mediaObject.setCurrentSource(Phonon.MediaSource(file))
|
||||
self.onMediaPlay()
|
||||
|
||||
def onMediaPlay(self):
|
||||
if not message[1]:
|
||||
return
|
||||
log.debug(u'VideoDisplay Play the new media, Live ')
|
||||
self.mediaObject.play()
|
||||
self.setVisible(True)
|
||||
self.showFullScreen()
|
||||
|
||||
def onMediaPause(self):
|
||||
if not message[1]:
|
||||
return
|
||||
log.debug(u'VideoDisplay Media paused by user')
|
||||
self.mediaObject.pause()
|
||||
self.show()
|
||||
|
||||
def onMediaStop(self):
|
||||
if not message[1]:
|
||||
return
|
||||
log.debug(u'VideoDisplay Media stopped by user')
|
||||
self.mediaObject.stop()
|
||||
self.onMediaFinish()
|
||||
|
||||
def onMediaFinish(self):
|
||||
if not message[1]:
|
||||
return
|
||||
log.debug(u'VideoDisplay Reached end of media playlist')
|
||||
self.mediaObject.clearQueue()
|
||||
self.setVisible(False)
|
||||
|
@ -103,8 +103,6 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.droppos = 0
|
||||
#is a new service and has not been saved
|
||||
self.isNew = True
|
||||
#Indicates if remoteTriggering is active. If it is the next addServiceItem call
|
||||
#will replace the currently selected one.
|
||||
self.serviceNoteForm = ServiceNoteForm()
|
||||
self.serviceItemEditForm = ServiceItemEditForm()
|
||||
#start with the layout
|
||||
|
@ -313,7 +313,8 @@ class SlideController(QtGui.QWidget):
|
||||
self.Toolbar.makeWidgetsInvisible(self.song_edit_list)
|
||||
self.Mediabar.setVisible(False)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'maindisplay_stop_loop'), self.onStopLoop)
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_stop_loop' % self.type_prefix),
|
||||
self.onStopLoop)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_first' % self.type_prefix),
|
||||
self.onSlideSelectedFirst)
|
||||
@ -480,7 +481,7 @@ class SlideController(QtGui.QWidget):
|
||||
blanked = self.blankButton.isChecked()
|
||||
else:
|
||||
blanked = False
|
||||
Receiver.send_message(u'slidecontroller_start',
|
||||
Receiver.send_message(u'%s_start' % serviceItem.name.lower(),
|
||||
[serviceItem, self.isLive, blanked, slideno])
|
||||
self.slideList = {}
|
||||
width = self.parent.ControlSplitter.sizes()[self.split]
|
||||
@ -553,6 +554,10 @@ class SlideController(QtGui.QWidget):
|
||||
self.enableToolBar(serviceItem)
|
||||
self.onSlideSelected()
|
||||
self.PreviewListWidget.setFocus()
|
||||
Receiver.send_message(u'%s_%s_started' %
|
||||
(self.serviceItem.name.lower(),
|
||||
'live' if self.isLive else 'preview'),
|
||||
[serviceItem])
|
||||
log.log(15, u'Display Rendering took %4s' % (time.time() - before))
|
||||
|
||||
#Screen event methods
|
||||
@ -562,7 +567,7 @@ class SlideController(QtGui.QWidget):
|
||||
"""
|
||||
if not self.serviceItem:
|
||||
return
|
||||
Receiver.send_message(u'slidecontroller_first',
|
||||
Receiver.send_message(u'%s_first' % self.serviceItem.name.lower(),
|
||||
[self.serviceItem, self.isLive])
|
||||
if self.serviceItem.is_command():
|
||||
self.updatePreview()
|
||||
@ -608,10 +613,11 @@ class SlideController(QtGui.QWidget):
|
||||
"""
|
||||
if self.serviceItem is not None:
|
||||
if blanked:
|
||||
Receiver.send_message(u'slidecontroller_blank',
|
||||
Receiver.send_message(u'%s_blank' % self.serviceItem.name.lower(),
|
||||
[self.serviceItem, self.isLive])
|
||||
else:
|
||||
Receiver.send_message(u'slidecontroller_unblank',
|
||||
Receiver.send_message(u'%s_unblank'
|
||||
% self.serviceItem.name.lower(),
|
||||
[self.serviceItem, self.isLive])
|
||||
self.parent.mainDisplay.blankDisplay(blankType, blanked)
|
||||
else:
|
||||
@ -625,7 +631,7 @@ class SlideController(QtGui.QWidget):
|
||||
row = self.PreviewListWidget.currentRow()
|
||||
self.selectedRow = 0
|
||||
if row > -1 and row < self.PreviewListWidget.rowCount():
|
||||
Receiver.send_message(u'slidecontroller_slide',
|
||||
Receiver.send_message(u'%s_slide' % self.serviceItem.name.lower(),
|
||||
[self.serviceItem, self.isLive, row])
|
||||
if self.serviceItem.is_command() and self.isLive:
|
||||
self.updatePreview()
|
||||
@ -679,7 +685,7 @@ class SlideController(QtGui.QWidget):
|
||||
"""
|
||||
if not self.serviceItem:
|
||||
return
|
||||
Receiver.send_message(u'slidecontroller_next',
|
||||
Receiver.send_message(u'%s_next' % self.serviceItem.name.lower(),
|
||||
[self.serviceItem, self.isLive])
|
||||
if self.serviceItem.is_command():
|
||||
self.updatePreview()
|
||||
@ -703,7 +709,7 @@ class SlideController(QtGui.QWidget):
|
||||
"""
|
||||
if not self.serviceItem:
|
||||
return
|
||||
Receiver.send_message(u'slidecontroller_previous',
|
||||
Receiver.send_message(u'%s_previous' % self.serviceItem.name.lower(),
|
||||
[self.serviceItem, self.isLive])
|
||||
if self.serviceItem.is_command():
|
||||
self.updatePreview()
|
||||
@ -723,7 +729,7 @@ class SlideController(QtGui.QWidget):
|
||||
"""
|
||||
if not self.serviceItem:
|
||||
return
|
||||
Receiver.send_message(u'slidecontroller_last',
|
||||
Receiver.send_message(u'%s_last' % self.serviceItem.name.lower(),
|
||||
[self.serviceItem, self.isLive])
|
||||
if self.serviceItem.is_command():
|
||||
self.updatePreview()
|
||||
@ -755,9 +761,8 @@ class SlideController(QtGui.QWidget):
|
||||
|
||||
def onEditSong(self):
|
||||
self.songEdit = True
|
||||
Receiver.send_message(u'%s_edit' %
|
||||
self.serviceItem.name.lower(), u'P:%s' %
|
||||
self.serviceItem.editId)
|
||||
Receiver.send_message(u'%s_edit' % self.serviceItem.name.lower(),
|
||||
u'P:%s' % self.serviceItem.editId)
|
||||
|
||||
def onGoLive(self):
|
||||
"""
|
||||
@ -770,12 +775,9 @@ class SlideController(QtGui.QWidget):
|
||||
|
||||
def onMediaStart(self, item):
|
||||
if self.isLive:
|
||||
blanked = self.blankButton.isChecked()
|
||||
Receiver.send_message(u'videodisplay_start',
|
||||
[item, self.blankButton.isChecked()])
|
||||
else:
|
||||
blanked = False
|
||||
Receiver.send_message(u'mediacontroller_start',
|
||||
[item, self.isLive, blanked])
|
||||
if not self.isLive:
|
||||
self.mediaObject.stop()
|
||||
self.mediaObject.clearQueue()
|
||||
file = os.path.join(item.get_frame_path(), item.get_frame_title())
|
||||
@ -785,23 +787,23 @@ class SlideController(QtGui.QWidget):
|
||||
self.onMediaPlay()
|
||||
|
||||
def onMediaPause(self):
|
||||
Receiver.send_message(u'mediacontroller_pause',
|
||||
[item, self.isLive])
|
||||
if not self.isLive:
|
||||
if self.isLive:
|
||||
Receiver.send_message(u'videodisplay_pause')
|
||||
else:
|
||||
self.mediaObject.pause()
|
||||
|
||||
def onMediaPlay(self):
|
||||
Receiver.send_message(u'mediacontroller_play',
|
||||
[item, self.isLive])
|
||||
if not self.isLive:
|
||||
if self.isLive:
|
||||
Receiver.send_message(u'videodisplay_play')
|
||||
else:
|
||||
self.SlidePreview.hide()
|
||||
self.video.show()
|
||||
self.mediaObject.play()
|
||||
|
||||
def onMediaStop(self):
|
||||
Receiver.send_message(u'mediacontroller_stop',
|
||||
[item, self.isLive])
|
||||
if not self.isLive:
|
||||
if self.isLive:
|
||||
Receiver.send_message(u'videodisplay_stop')
|
||||
else:
|
||||
self.mediaObject.stop()
|
||||
self.video.hide()
|
||||
self.SlidePreview.clear()
|
||||
|
@ -186,23 +186,23 @@ class MessageListener(object):
|
||||
self.liveHandler = Controller(True)
|
||||
# messages are sent from core.ui.slidecontroller
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_start'), self.startup)
|
||||
QtCore.SIGNAL(u'presentation_start'), self.startup)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_stop'), self.shutdown)
|
||||
QtCore.SIGNAL(u'presentation_stop'), self.shutdown)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_first'), self.first)
|
||||
QtCore.SIGNAL(u'presentation_first'), self.first)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_previous'), self.previous)
|
||||
QtCore.SIGNAL(u'presentation_previous'), self.previous)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_next'), self.next)
|
||||
QtCore.SIGNAL(u'presentation_next'), self.next)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_last'), self.last)
|
||||
QtCore.SIGNAL(u'presentation_last'), self.last)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_slide'), self.slide)
|
||||
QtCore.SIGNAL(u'presentation_slide'), self.slide)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_blank'), self.blank)
|
||||
QtCore.SIGNAL(u'presentation_blank'), self.blank)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_unblank'), self.unblank)
|
||||
QtCore.SIGNAL(u'presentation_unblank'), self.unblank)
|
||||
self.timer = QtCore.QTimer()
|
||||
self.timer.setInterval(500)
|
||||
QtCore.QObject.connect(self.timer, QtCore.SIGNAL("timeout()"), self.timeout)
|
||||
@ -212,9 +212,7 @@ class MessageListener(object):
|
||||
Start of new presentation
|
||||
Save the handler as any new presentations start here
|
||||
"""
|
||||
name, isLive, item = self.decode_message(message)
|
||||
if name != u'presentation':
|
||||
return
|
||||
isLive, item = self.decode_message(message)
|
||||
log.debug(u'Startup called with message %s' % message)
|
||||
isBlank = message[2]
|
||||
file = os.path.join(item.get_frame_path(),
|
||||
@ -231,57 +229,45 @@ class MessageListener(object):
|
||||
controller.addHandler(self.controllers[self.handler], file, isBlank)
|
||||
|
||||
def decode_message(self, message):
|
||||
return message[0].name.lower(), message[1], message[0]
|
||||
return message[1], message[0]
|
||||
|
||||
def slide(self, message):
|
||||
name, isLive, item = self.decode_message(message)
|
||||
if name != u'presentation':
|
||||
return
|
||||
isLive, item = self.decode_message(message)
|
||||
if isLive:
|
||||
self.liveHandler.slide(slide, live)
|
||||
else:
|
||||
self.previewHandler.slide(slide, live)
|
||||
|
||||
def first(self, message):
|
||||
name, isLive, item = self.decode_message(message)
|
||||
if name != u'presentation':
|
||||
return
|
||||
isLive, item = self.decode_message(message)
|
||||
if isLive:
|
||||
self.liveHandler.first()
|
||||
else:
|
||||
self.previewHandler.first()
|
||||
|
||||
def last(self, message):
|
||||
name, isLive, item = self.decode_message(message)
|
||||
if name != u'presentation':
|
||||
return
|
||||
isLive, item = self.decode_message(message)
|
||||
if isLive:
|
||||
self.liveHandler.last()
|
||||
else:
|
||||
self.previewHandler.last()
|
||||
|
||||
def next(self, message):
|
||||
name, isLive, item = self.decode_message(message)
|
||||
if name != u'presentation':
|
||||
return
|
||||
isLive, item = self.decode_message(message)
|
||||
if isLive:
|
||||
self.liveHandler.next()
|
||||
else:
|
||||
self.previewHandler.next()
|
||||
|
||||
def previous(self, message):
|
||||
name, isLive, item = self.decode_message(message)
|
||||
if name != u'presentation':
|
||||
return
|
||||
isLive, item = self.decode_message(message)
|
||||
if isLive:
|
||||
self.liveHandler.previous()
|
||||
else:
|
||||
self.previewHandler.previous()
|
||||
|
||||
def shutdown(self, message):
|
||||
name, isLive, item = self.decode_message(message)
|
||||
if name != u'presentation':
|
||||
return
|
||||
isLive, item = self.decode_message(message)
|
||||
if isLive:
|
||||
Receiver.send_message(u'maindisplay_show')
|
||||
self.liveHandler.shutdown()
|
||||
@ -289,16 +275,12 @@ class MessageListener(object):
|
||||
self.previewHandler.shutdown()
|
||||
|
||||
def blank(self, message):
|
||||
name, isLive, item = self.decode_message(message)
|
||||
if name != u'presentation':
|
||||
return
|
||||
isLive, item = self.decode_message(message)
|
||||
if isLive:
|
||||
self.liveHandler.blank()
|
||||
|
||||
def unblank(self, message):
|
||||
name, isLive, item = self.decode_message(message)
|
||||
if name != u'presentation':
|
||||
return
|
||||
isLive, item = self.decode_message(message)
|
||||
if isLive:
|
||||
self.liveHandler.unblank()
|
||||
|
||||
|
@ -107,7 +107,7 @@ class SongUsagePlugin(Plugin):
|
||||
log.info(u'SongUsage Initialising')
|
||||
Plugin.initialise(self)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_start'), self.onReceiveSongUsage)
|
||||
QtCore.SIGNAL(u'slidecontroller_live_started'), self.onReceiveSongUsage)
|
||||
self.SongUsageActive = str_to_bool(
|
||||
self.config.get_config(u'active', False))
|
||||
self.SongUsageStatus.setChecked(self.SongUsageActive)
|
||||
@ -132,8 +132,7 @@ class SongUsagePlugin(Plugin):
|
||||
SongUsage a live song from SlideController
|
||||
"""
|
||||
audit = items[0].audit
|
||||
live = items[1]
|
||||
if self.SongUsageActive and audit and live:
|
||||
if self.SongUsageActive and audit:
|
||||
song_usage_item = SongUsageItem()
|
||||
song_usage_item.usagedate = datetime.today()
|
||||
song_usage_item.usagetime = datetime.now().time()
|
||||
|
Loading…
Reference in New Issue
Block a user