openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #05607
[Merge] lp:~meths/openlp/trivialfixes into lp:openlp
Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/46401
Fix local bible quick search.
Fix OpenSong CUV bible import.
--
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/46401
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/plugins/bibles/lib/db.py'
--- openlp/plugins/bibles/lib/db.py 2011-01-15 19:44:31 +0000
+++ openlp/plugins/bibles/lib/db.py 2011-01-16 00:50:48 +0000
@@ -340,11 +340,11 @@
verse_list = []
for book, chapter, start_verse, end_verse in reference_list:
db_book = self.get_book(book)
- if end_verse == -1:
- end_verse = self.get_verse_count(book, chapter)
if db_book:
book = db_book.name
log.debug(u'Book name corrected to "%s"', book)
+ if end_verse == -1:
+ end_verse = self.get_verse_count(book, chapter)
verses = self.session.query(Verse)\
.filter_by(book_id=db_book.id)\
.filter_by(chapter=chapter)\
=== modified file 'openlp/plugins/bibles/lib/opensong.py'
--- openlp/plugins/bibles/lib/opensong.py 2011-01-13 17:55:29 +0000
+++ openlp/plugins/bibles/lib/opensong.py 2011-01-16 00:50:48 +0000
@@ -79,7 +79,7 @@
break
self.create_verse(
db_book.id,
- int(chapter.attrib[u'n']),
+ int(chapter.attrib[u'n'].split()[-1]),
int(verse.attrib[u'n']),
unicode(verse.text)
)
@@ -87,7 +87,7 @@
self.wizard.incrementProgressBar(unicode(translate(
'BiblesPlugin.Opensong', 'Importing %s %s...',
'Importing <book name> <chapter>...')) %
- (db_book.name, int(chapter.attrib[u'n'])))
+ (db_book.name, int(chapter.attrib[u'n'].split()[-1])))
self.session.commit()
except (IOError, AttributeError):
log.exception(u'Loading bible from OpenSong file failed')
Follow ups