forked from openlp/openlp
Fix audit to not crash, add copyright to DB and fix CCL
This commit is contained in:
parent
44ecfe6dd3
commit
3ce692bbac
@ -116,7 +116,8 @@ class AuditPlugin(Plugin):
|
||||
audititem.auditdate = datetime.today()
|
||||
audititem.audittime = datetime.now().time()
|
||||
audititem.title = auditData[0]
|
||||
audititem.ccl_id = auditData[2]
|
||||
audititem.copyright = auditData[2]
|
||||
audititem.ccl_number = auditData[3]
|
||||
audititem.authors = u''
|
||||
for author in auditData[1]:
|
||||
audititem.authors += author + u' '
|
||||
@ -129,14 +130,5 @@ class AuditPlugin(Plugin):
|
||||
"""
|
||||
self.auditActive = str_to_bool(
|
||||
self.config.get_config(u'audit active', False))
|
||||
if self.auditFileNameNew == u'':
|
||||
self.auditActive = False
|
||||
self.ToolsAuditItem.setChecked(self.auditActive)
|
||||
self.ToolsAuditItem.setEnabled(False)
|
||||
return
|
||||
# self.ToolsAuditItem.setChecked(self.auditActive)
|
||||
self.ToolsAuditItem.setEnabled(True)
|
||||
if self.auditFileNameNew != self.auditFileName:
|
||||
if self.auditFile is not None:
|
||||
self.auditFile.close()
|
||||
self.auditFile = open(self.auditFileNameNew, u'a')
|
||||
|
||||
|
@ -33,5 +33,6 @@ audit_table = Table(u'audit_data', metadata,
|
||||
Column(u'audittime', types.Time, index=True, nullable=False),
|
||||
Column(u'title', types.Unicode(255), nullable=False),
|
||||
Column(u'authors', types.Unicode(255), nullable=False),
|
||||
Column(u'ccl_id', types.Unicode(65), nullable=False)
|
||||
Column(u'copyright', types.Unicode(255), nullable=False),
|
||||
Column(u'ccl_number', types.Unicode(65), nullable=False)
|
||||
)
|
||||
|
@ -308,5 +308,5 @@ class SongMediaItem(MediaManagerItem):
|
||||
raw_footer.append(unicode(
|
||||
translate(u'SongMediaItem', u'CCL Licence: ') + ccl))
|
||||
service_item.raw_footer = raw_footer
|
||||
service_item.audit = [service_item.title, author_audit, ccl]
|
||||
service_item.audit = [service_item.title, author_audit,song.copyright, unicode(song.ccli_number)]
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user