service load match authors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenLP |
New
|
Low
|
Unassigned |
Bug Description
the service_load function in mediaitem.py match authors with _authors_match function. If the authors string includes commas like this: "Text: Mr. X, Alan Cross", the _authors_match function fails. The json.load uses by default commas for separation and split(', ') isn't a good choose...
I'am a python noob, but here the modified function:
def _authors_
"""
Checks whether authors from a song in the database match the authors of the song to be imported.
:param song: A list of authors from the song in the database
:param authors: A string with authors from the song to be imported
:return: True when Authors do match, else False.
"""
author_list = []
for author in song.authors:
if authors_song == authors:
return True
else:
return False
Please fix the bug!
Thanks
Changed in openlp: | |
importance: | Undecided → Low |
the chronology of song.authors may be still a problem... or switch the json separator...