Merge lp:~sam92/openlp/songbook-first-slide into lp:openlp

Proposed by Samuel Mehrbrodt
Status: Merged
Merged at revision: 2851
Proposed branch: lp:~sam92/openlp/songbook-first-slide
Merge into: lp:openlp
Diff against target: 31 lines (+6/-4)
2 files modified
openlp/plugins/songs/lib/mediaitem.py (+5/-3)
openlp/plugins/songs/lib/songstab.py (+1/-1)
To merge this branch: bzr merge lp:~sam92/openlp/songbook-first-slide
Reviewer Review Type Date Requested Status
Tomas Groth Approve
Phill Approve
Review via email: mp+363538@code.launchpad.net

Commit message

Fix songbook as first slide display

* Use same format as in footer
* Only display publisher if it is set
* Fix typo in settings

To post a comment you must log in.
Revision history for this message
Samuel Mehrbrodt (sam92) wrote :

Will add a test once I get the tests working again on my machine.

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Linux tests passed!

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Linting passed!

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

macOS tests passed!

Revision history for this message
Phill (phill-ridout) wrote :

Looks good. Others may say a test is required ;-)

review: Approve
Revision history for this message
Tomas Groth (tomasgroth) wrote :

Looks good - let's get it in :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2019-02-14 15:09:09 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2019-02-22 07:38:19 +0000
@@ -585,9 +585,11 @@
585 if Settings().value('songs/add songbook slide') and song.songbook_entries:585 if Settings().value('songs/add songbook slide') and song.songbook_entries:
586 first_slide = '\n'586 first_slide = '\n'
587 for songbook_entry in song.songbook_entries:587 for songbook_entry in song.songbook_entries:
588 first_slide = first_slide + '{book}/{num}/{pub}\n\n'.format(book=songbook_entry.songbook.name,588 first_slide += '{book} #{num}'.format(book=songbook_entry.songbook.name,
589 num=songbook_entry.entry,589 num=songbook_entry.entry)
590 pub=songbook_entry.songbook.publisher)590 if songbook_entry.songbook.publisher:
591 first_slide += ' ({pub})'.format(pub=songbook_entry.songbook.publisher)
592 first_slide += '\n\n'
591593
592 service_item.add_from_text(first_slide, 'O1')594 service_item.add_from_text(first_slide, 'O1')
593 # no verse list or only 1 space (in error)595 # no verse list or only 1 space (in error)
594596
=== modified file 'openlp/plugins/songs/lib/songstab.py'
--- openlp/plugins/songs/lib/songstab.py 2019-02-14 15:09:09 +0000
+++ openlp/plugins/songs/lib/songstab.py 2019-02-22 07:38:19 +0000
@@ -116,7 +116,7 @@
116 self.add_from_service_check_box.setText(translate('SongsPlugin.SongsTab',116 self.add_from_service_check_box.setText(translate('SongsPlugin.SongsTab',
117 'Import missing songs from Service files'))117 'Import missing songs from Service files'))
118 self.songbook_slide_check_box.setText(translate('SongsPlugin.SongsTab',118 self.songbook_slide_check_box.setText(translate('SongsPlugin.SongsTab',
119 'Add Songbooks as first side'))119 'Add Songbooks as first slide'))
120 self.display_songbook_check_box.setText(translate('SongsPlugin.SongsTab', 'Display songbook in footer'))120 self.display_songbook_check_box.setText(translate('SongsPlugin.SongsTab', 'Display songbook in footer'))
121 self.display_written_by_check_box.setText(translate(121 self.display_written_by_check_box.setText(translate(
122 'SongsPlugin.SongsTab', 'Show "Written by:" in footer for unspecified authors'))122 'SongsPlugin.SongsTab', 'Show "Written by:" in footer for unspecified authors'))