forked from openlp/openlp
Block song exports
This commit is contained in:
parent
f751ae092a
commit
17bca693c6
@ -358,7 +358,10 @@ class Manager(object):
|
|||||||
|
|
||||||
def delete_all_objects(self, object_class, filter_clause=None):
|
def delete_all_objects(self, object_class, filter_clause=None):
|
||||||
"""
|
"""
|
||||||
Delete all object records
|
Delete all object records.
|
||||||
|
This method should only be used for simple tables and not ones with
|
||||||
|
relationships. The relationships are not deleted from the database and
|
||||||
|
this will lead to database corruptions.
|
||||||
|
|
||||||
``object_class``
|
``object_class``
|
||||||
The type of object to delete
|
The type of object to delete
|
||||||
|
@ -252,6 +252,9 @@ class SongExportForm(OpenLPWizard):
|
|||||||
songs = self.plugin.manager.get_all_objects(Song)
|
songs = self.plugin.manager.get_all_objects(Song)
|
||||||
songs.sort(cmp=locale.strcoll, key=lambda song: song.title.lower())
|
songs.sort(cmp=locale.strcoll, key=lambda song: song.title.lower())
|
||||||
for song in songs:
|
for song in songs:
|
||||||
|
# No need to export temporary songs.
|
||||||
|
if song.temporary:
|
||||||
|
continue
|
||||||
authors = u', '.join([author.display_name
|
authors = u', '.join([author.display_name
|
||||||
for author in song.authors])
|
for author in song.authors])
|
||||||
title = u'%s (%s)' % (unicode(song.title), authors)
|
title = u'%s (%s)' % (unicode(song.title), authors)
|
||||||
|
Loading…
Reference in New Issue
Block a user