Merge lp:~suutari-olli/openlp/fix-openlp-importer into lp:openlp

Proposed by Azaziah
Status: Superseded
Proposed branch: lp:~suutari-olli/openlp/fix-openlp-importer
Merge into: lp:openlp
Diff against target: 24 lines (+9/-2)
1 file modified
openlp/plugins/songs/lib/importers/openlp.py (+9/-2)
To merge this branch: bzr merge lp:~suutari-olli/openlp/fix-openlp-importer
Reviewer Review Type Date Requested Status
Tim Bentley Needs Fixing
Review via email: mp+314296@code.launchpad.net

This proposal supersedes a proposal from 2017-01-08.

This proposal has been superseded by a proposal from 2017-01-08.

Description of the change

- For diff (trunk)

To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) wrote :

Question and no tests Sorry!

review: Needs Fixing
Revision history for this message
Azaziah (suutari-olli) wrote :

I don't understand the question, and this branch is still a work in progress
- "proposals" are only for diff for now.

2717. By Azaziah

- Fixed bug #1632567

2718. By Azaziah

- This is broken, attempted to fix author types on import

Unmerged revisions

2718. By Azaziah

- This is broken, attempted to fix author types on import

2717. By Azaziah

- Fixed bug #1632567

2716. By Azaziah

- Better fix, now checks for songbook entry 1st.

2715. By Azaziah

- Fixed bug: 1652003

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'openlp/plugins/songs/lib/importers/openlp.py'
--- openlp/plugins/songs/lib/importers/openlp.py 2016-12-31 11:01:36 +0000
+++ openlp/plugins/songs/lib/importers/openlp.py 2017-01-08 23:00:41 +0000
@@ -221,11 +221,18 @@
221 if not existing_book:221 if not existing_book:
222 existing_book = Book.populate(name=entry.songbook.name, publisher=entry.songbook.publisher)222 existing_book = Book.populate(name=entry.songbook.name, publisher=entry.songbook.publisher)
223 new_song.add_songbook_entry(existing_book, entry.entry)223 new_song.add_songbook_entry(existing_book, entry.entry)
224 elif song.book:224 elif hasattr(song, 'book') and song.book:
225 existing_book = self.manager.get_object_filtered(Book, Book.name == song.book.name)225 existing_book = self.manager.get_object_filtered(Book, Book.name == song.book.name)
226 if not existing_book:226 if not existing_book:
227 existing_book = Book.populate(name=song.book.name, publisher=song.book.publisher)227 existing_book = Book.populate(name=song.book.name, publisher=song.book.publisher)
228 new_song.add_songbook_entry(existing_book, '')228 # Get the song_number from "songs" table "song_number" field. (This is db structure from 2.2.1)
229 # If there's a number, add it to the song, otherwise it will be "".
230 existing_number = song.song_number
231 if existing_number:
232 new_song.add_songbook_entry(existing_book, existing_number)
233 else:
234 new_song.add_songbook_entry(existing_book, "")
235
229 # Find or create all the media files and add them to the new song object236 # Find or create all the media files and add them to the new song object
230 if has_media_files and song.media_files:237 if has_media_files and song.media_files:
231 for media_file in song.media_files:238 for media_file in song.media_files: