forked from openlp/openlp
removed mistakes
This commit is contained in:
parent
95f30dfb6d
commit
fe452bc588
@ -418,9 +418,9 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
item.data_string[u'title'].split(u'@')[0].lower() ,
|
item.data_string[u'title'].split(u'@')[0].lower() ,
|
||||||
Song.search_title.asc())
|
Song.search_title.asc())
|
||||||
author_list = item.data_string[u'authors'].split(u', ')
|
author_list = item.data_string[u'authors'].split(u', ')
|
||||||
# The service item always has an author (at least it has u''
|
# The service item always has an author (at least it has u'' as
|
||||||
# as author). However, songs saved in the database do not
|
# author). However, songs saved in the database do not have to have
|
||||||
# have to have an author.
|
# an author.
|
||||||
if u'' in author_list:
|
if u'' in author_list:
|
||||||
author_list.remove(u'')
|
author_list.remove(u'')
|
||||||
editId = 0
|
editId = 0
|
||||||
@ -428,20 +428,20 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
add_song = True
|
add_song = True
|
||||||
if search_results:
|
if search_results:
|
||||||
for song in search_results:
|
for song in search_results:
|
||||||
same_author = True
|
same_authors = True
|
||||||
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_author = False
|
same_authors = False
|
||||||
# All Authors the same, so we can stop here and the song
|
# All Authors the same, so we can stop here and the song
|
||||||
# does not have to be saved.
|
# does not have to be saved.
|
||||||
if same_author:
|
if same_authors:
|
||||||
editId = song.id
|
editId = song.id
|
||||||
add_song = False
|
add_song = False
|
||||||
break
|
break
|
||||||
if add_song:
|
if add_song:
|
||||||
# Authors different
|
# 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',
|
||||||
|
Loading…
Reference in New Issue
Block a user