mirror of https://gitlab.com/openlp/openlp.git
Stop Service File items from containing more than one audio file
This commit is contained in:
parent
d2a2b94273
commit
9b9d8feafa
|
@ -628,9 +628,11 @@ class SongMediaItem(MediaManagerItem):
|
|||
if State().check_preconditions('media'):
|
||||
service_item.add_capability(ItemCapabilities.HasBackgroundAudio)
|
||||
total_length = 0
|
||||
# We could have stored multiple files but only the first one will be played.
|
||||
for m in song.media_files:
|
||||
total_length += self.media_controller.media_length(m.file_path)
|
||||
service_item.background_audio = [(m.file_path, m.file_hash) for m in song.media_files]
|
||||
service_item.background_audio = [(m.file_path, m.file_hash)]
|
||||
break
|
||||
service_item.set_media_length(total_length)
|
||||
service_item.metadata.append('<em>{label}:</em> {media}'.
|
||||
format(label=translate('SongsPlugin.MediaItem', 'Media'),
|
||||
|
|
Loading…
Reference in New Issue