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
1=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
2--- openlp/plugins/songs/lib/mediaitem.py 2019-02-14 15:09:09 +0000
3+++ openlp/plugins/songs/lib/mediaitem.py 2019-02-22 07:38:19 +0000
4@@ -585,9 +585,11 @@
5 if Settings().value('songs/add songbook slide') and song.songbook_entries:
6 first_slide = '\n'
7 for songbook_entry in song.songbook_entries:
8- first_slide = first_slide + '{book}/{num}/{pub}\n\n'.format(book=songbook_entry.songbook.name,
9- num=songbook_entry.entry,
10- pub=songbook_entry.songbook.publisher)
11+ first_slide += '{book} #{num}'.format(book=songbook_entry.songbook.name,
12+ num=songbook_entry.entry)
13+ if songbook_entry.songbook.publisher:
14+ first_slide += ' ({pub})'.format(pub=songbook_entry.songbook.publisher)
15+ first_slide += '\n\n'
16
17 service_item.add_from_text(first_slide, 'O1')
18 # no verse list or only 1 space (in error)
19
20=== modified file 'openlp/plugins/songs/lib/songstab.py'
21--- openlp/plugins/songs/lib/songstab.py 2019-02-14 15:09:09 +0000
22+++ openlp/plugins/songs/lib/songstab.py 2019-02-22 07:38:19 +0000
23@@ -116,7 +116,7 @@
24 self.add_from_service_check_box.setText(translate('SongsPlugin.SongsTab',
25 'Import missing songs from Service files'))
26 self.songbook_slide_check_box.setText(translate('SongsPlugin.SongsTab',
27- 'Add Songbooks as first side'))
28+ 'Add Songbooks as first slide'))
29 self.display_songbook_check_box.setText(translate('SongsPlugin.SongsTab', 'Display songbook in footer'))
30 self.display_written_by_check_box.setText(translate(
31 'SongsPlugin.SongsTab', 'Show "Written by:" in footer for unspecified authors'))