← Back to team overview

openlp-core team mailing list archive

[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/50467

Fix the CCLI author handling to work with or without a comma
-- 
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/50467
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/plugins/songs/lib/cclifileimport.py'
--- openlp/plugins/songs/lib/cclifileimport.py	2011-02-18 17:34:43 +0000
+++ openlp/plugins/songs/lib/cclifileimport.py	2011-02-19 20:36:17 +0000
@@ -199,8 +199,11 @@
         if len(author_list) < 2:
             author_list = song_author.split(u'|')
         for author in author_list:
-            seperated = author.split(u',')
-            self.add_author(seperated[1].strip() + u' ' + seperated[0].strip())
+            separated = author.split(u',')
+            if len(separated) > 1:
+                self.add_author(u' '.join(reversed(separated)))
+            else:
+                self.add_author(author)
         self.title = song_name
         self.copyright = song_copyright
         self.ccli_number = song_ccli


Follow ups