forked from openlp/openlp
Start cleaning getters and setters
This commit is contained in:
parent
65d5f89302
commit
5097cbaf9c
@ -142,7 +142,7 @@ class SofImport(OooImport):
|
||||
self.blanklines += 1
|
||||
if self.blanklines > 1:
|
||||
return
|
||||
if self.song.get_title() != u'':
|
||||
if self.song.title != u'':
|
||||
self.finish_verse()
|
||||
return
|
||||
self.blanklines = 0
|
||||
@ -166,7 +166,7 @@ class SofImport(OooImport):
|
||||
self.finish_verse()
|
||||
self.song.repeat_verse()
|
||||
return
|
||||
if self.song.get_title() == u'':
|
||||
if self.song.title == u'':
|
||||
if self.song.get_copyright() == u'':
|
||||
self.add_author(text)
|
||||
else:
|
||||
@ -190,7 +190,7 @@ class SofImport(OooImport):
|
||||
if boldtext.isdigit() and self.song.get_song_number() == '':
|
||||
self.add_songnumber(boldtext)
|
||||
return u''
|
||||
if self.song.get_title() == u'':
|
||||
if self.song.title == u'':
|
||||
text = self.uncap_text(text)
|
||||
self.add_title(text)
|
||||
return text
|
||||
@ -245,7 +245,7 @@ class SofImport(OooImport):
|
||||
title = title[1:]
|
||||
if title.endswith(u','):
|
||||
title = title[:-1]
|
||||
self.song.set_title(title)
|
||||
self.song.title = title
|
||||
|
||||
def add_author(self, text):
|
||||
"""
|
||||
|
@ -123,16 +123,10 @@ class SongImport(object):
|
||||
if len(lines) == 1:
|
||||
self.parse_author(lines[0])
|
||||
return
|
||||
if not self.get_title():
|
||||
self.set_title(lines[0])
|
||||
if not self.title:
|
||||
self.title = lines[0]
|
||||
self.add_verse(text)
|
||||
|
||||
def get_title(self):
|
||||
"""
|
||||
Return the title
|
||||
"""
|
||||
return self.title
|
||||
|
||||
def get_copyright(self):
|
||||
"""
|
||||
Return the copyright
|
||||
@ -145,12 +139,6 @@ class SongImport(object):
|
||||
"""
|
||||
return self.song_number
|
||||
|
||||
def set_title(self, title):
|
||||
"""
|
||||
Set the title
|
||||
"""
|
||||
self.title = title
|
||||
|
||||
def set_alternate_title(self, title):
|
||||
"""
|
||||
Set the alternate title
|
||||
|
@ -366,10 +366,6 @@ class Song(object):
|
||||
if len(self.search_title) < 1:
|
||||
raise SongTitleError(u'The searchable title is empty')
|
||||
|
||||
def get_title(self):
|
||||
"""Return title value"""
|
||||
return self.title
|
||||
|
||||
def from_ccli_text_buffer(self, textList):
|
||||
"""
|
||||
Create song from a list of texts (strings) - CCLI text format expected
|
||||
@ -688,7 +684,7 @@ class Song(object):
|
||||
raise SongSlideError(u'Slide number too high')
|
||||
res = []
|
||||
if self.show_title:
|
||||
title = self.get_title()
|
||||
title = self.title
|
||||
else:
|
||||
title = ""
|
||||
if self.show_author_list:
|
||||
|
Loading…
Reference in New Issue
Block a user