Hello

In our church, we are exporting the song and archiving them in version control. Now the titles of the files are named the tile of the song + authors. The authors are ordered randomly. That gives me more work.

I made one attempt at implementing it. I included the patch here since I didn't want to spend more time trying to do it with bzr. If the patch is good could you include it in trunk?


I know this is not the place to send patches but I could't figure it out how to submit a PR with Bazaar.

Best regards
  Simon Toivo Telhaug
 diff --git a/openlp/plugins/songs/forms/songexportform.py b/openlp/plugins/songs/forms/songexportform.py
index cff7658..f182769 100644
--- a/openlp/plugins/songs/forms/songexportform.py
+++ b/openlp/plugins/songs/forms/songexportform.py
@@ -219,8 +219,11 @@ class SongExportForm(OpenLPWizard):
             # No need to export temporary songs.
             if song.temporary:
                 continue
-            authors = create_separated_list([author.display_name for author in song.authors])
-            title = '{title} ({author})'.format(title=song.title, author=authors)
+
+            authors = [author.display_name for author in song.authors]
+            authors.sort()
+            title = '{title} ({author})'.format(title=song.title,
+                                                author=create_separated_list(authors))
             item = QtWidgets.QListWidgetItem(title)
             item.setData(QtCore.Qt.UserRole, song)
             item.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsUserCheckable | QtCore.Qt.ItemIsEnabled)
_______________________________________________
openlp-dev mailing list
[email protected]
https://lists.openlp.io/mailman/listinfo/openlp-dev

Reply via email to