Fix songbook as first slide display

bzr-revno: 2851
This commit is contained in:
Samuel Mehrbrodt 2019-03-28 21:19:15 +01:00 committed by Tomas Groth
commit 720d79e46a
2 changed files with 6 additions and 4 deletions

View File

@ -583,9 +583,11 @@ class SongMediaItem(MediaManagerItem):
if Settings().value('songs/add songbook slide') and song.songbook_entries: if Settings().value('songs/add songbook slide') and song.songbook_entries:
first_slide = '\n' first_slide = '\n'
for songbook_entry in song.songbook_entries: for songbook_entry in song.songbook_entries:
first_slide = first_slide + '{book}/{num}/{pub}\n\n'.format(book=songbook_entry.songbook.name, first_slide += '{book} #{num}'.format(book=songbook_entry.songbook.name,
num=songbook_entry.entry, num=songbook_entry.entry)
pub=songbook_entry.songbook.publisher) if songbook_entry.songbook.publisher:
first_slide += ' ({pub})'.format(pub=songbook_entry.songbook.publisher)
first_slide += '\n\n'
service_item.add_from_text(first_slide, 'O1') service_item.add_from_text(first_slide, 'O1')
# no verse list or only 1 space (in error) # no verse list or only 1 space (in error)

View File

@ -116,7 +116,7 @@ class SongsTab(SettingsTab):
self.add_from_service_check_box.setText(translate('SongsPlugin.SongsTab', self.add_from_service_check_box.setText(translate('SongsPlugin.SongsTab',
'Import missing songs from Service files')) 'Import missing songs from Service files'))
self.songbook_slide_check_box.setText(translate('SongsPlugin.SongsTab', self.songbook_slide_check_box.setText(translate('SongsPlugin.SongsTab',
'Add Songbooks as first side')) 'Add Songbooks as first slide'))
self.display_songbook_check_box.setText(translate('SongsPlugin.SongsTab', 'Display songbook in footer')) self.display_songbook_check_box.setText(translate('SongsPlugin.SongsTab', 'Display songbook in footer'))
self.display_written_by_check_box.setText(translate( self.display_written_by_check_box.setText(translate(
'SongsPlugin.SongsTab', 'Show "Written by:" in footer for unspecified authors')) 'SongsPlugin.SongsTab', 'Show "Written by:" in footer for unspecified authors'))