forked from openlp/openlp
fixed bug #690774
This commit is contained in:
parent
e257f0431b
commit
3cdac511e2
@ -429,20 +429,26 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
if search_results:
|
if search_results:
|
||||||
for song in search_results:
|
for song in search_results:
|
||||||
same_authors = True
|
same_authors = True
|
||||||
|
# If the author counts are different, we do not have to do
|
||||||
|
# any further checking. This is also important when a song
|
||||||
|
# does not have any author (because we can not loop over an
|
||||||
|
# empty list).
|
||||||
|
if len(song.authors) == len(author_list):
|
||||||
for author in song.authors:
|
for author in song.authors:
|
||||||
if author.display_name not in author_list:
|
if author.display_name not in author_list:
|
||||||
same_authors = False
|
same_authors = False
|
||||||
# All Authors the same, so we can stop here and the song
|
else:
|
||||||
|
same_authors = False
|
||||||
|
# All authors are the same, so we can stop here and the song
|
||||||
# does not have to be saved.
|
# does not have to be saved.
|
||||||
if same_authors:
|
if same_authors:
|
||||||
editId = song.id
|
|
||||||
add_song = False
|
add_song = False
|
||||||
|
editId = song.id
|
||||||
break
|
break
|
||||||
if add_song:
|
if add_song:
|
||||||
# Authors different
|
|
||||||
if self.addSongFromService:
|
if self.addSongFromService:
|
||||||
editId = self.openLyrics.xml_to_song(item.xml_version)
|
editId = self.openLyrics.xml_to_song(item.xml_version)
|
||||||
# Update service with correct song id
|
# Update service with correct song id.
|
||||||
if editId != 0:
|
if editId != 0:
|
||||||
Receiver.send_message(u'service_item_update',
|
Receiver.send_message(u'service_item_update',
|
||||||
u'%s:%s' %(editId, uuid))
|
u'%s:%s' %(editId, uuid))
|
||||||
|
Loading…
Reference in New Issue
Block a user