forked from openlp/openlp
Media now has start and end times
This commit is contained in:
parent
7fc84ad2b2
commit
921163dbcd
@ -367,7 +367,7 @@ class MainDisplay(DisplayWidget):
|
||||
self.mediaObject.setCurrentSource(Phonon.MediaSource(videoPath))
|
||||
# Need the timer to trigger set the trigger to 200ms
|
||||
# Value taken from web documentation.
|
||||
if self.serviceItem.start_time != 0:
|
||||
if self.serviceItem.end_time != 0:
|
||||
self.mediaObject.setTickInterval(200)
|
||||
self.mediaObject.play()
|
||||
self.webView.setVisible(False)
|
||||
@ -399,9 +399,9 @@ class MainDisplay(DisplayWidget):
|
||||
def videoTick(self, tick):
|
||||
"""
|
||||
Triggered on video tick every 200 milli seconds
|
||||
Will be used to manage stop time later
|
||||
"""
|
||||
pass
|
||||
if tick > self.serviceItem.end_time * 1000:
|
||||
self.videoFinished()
|
||||
|
||||
def isWebLoaded(self):
|
||||
"""
|
||||
|
@ -134,9 +134,12 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
||||
item.notes.replace(u'\n', u'<br />'))
|
||||
# Add play length of media files.
|
||||
if item.is_media() and self.metaDataCheckBox.isChecked():
|
||||
tme = item.media_length
|
||||
if item.end_time > 0:
|
||||
tme = item.end_time - item.start_time
|
||||
text += u'<p><strong>%s</strong> %s</p>' % (translate(
|
||||
'OpenLP.ServiceManager', u'Playing time:'),
|
||||
unicode(datetime.timedelta(seconds=item.media_length)))
|
||||
unicode(datetime.timedelta(seconds=tme)))
|
||||
if self.footerTextEdit.toPlainText():
|
||||
text += u'<h4>%s</h4>%s' % (translate('OpenLP.ServiceManager',
|
||||
u'Custom Service Notes:'), self.footerTextEdit.toPlainText())
|
||||
|
@ -141,4 +141,3 @@ class ServiceItemEditForm(QtGui.QDialog, Ui_ServiceItemEditDialog):
|
||||
else:
|
||||
self.upButton.setEnabled(True)
|
||||
self.deleteButton.setEnabled(True)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user