removed old code

This commit is contained in:
Andreas Preikschat 2014-05-01 19:06:47 +02:00
parent 2ba7fa4f44
commit 53d830b737
2 changed files with 2 additions and 12 deletions

View File

@ -122,8 +122,6 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog):
text = text[:position + 4] text = text[:position + 4]
match = VERSE_REGEX.match(text) match = VERSE_REGEX.match(text)
if match: if match:
# TODO: Not used, remove?
# verse_tag = match.group(1)
try: try:
verse_num = int(match.group(2)) + 1 verse_num = int(match.group(2)) + 1
except ValueError: except ValueError:

View File

@ -518,14 +518,6 @@ class SongMediaItem(MediaManagerItem):
log.debug('service_load') log.debug('service_load')
if self.plugin.status != PluginStatus.Active or not item.data_string: if self.plugin.status != PluginStatus.Active or not item.data_string:
return return
if item.data_string['title'].find('@') == -1:
# FIXME: This file seems to be an old one (prior to 1.9.5), which means, that the search title
# (data_string[u'title']) is probably wrong. We add "@" to search title and hope that we do not add any
# duplicate. This should work for songs without alternate title.
temp = (re.compile(r'\W+', re.UNICODE).sub(' ', item.data_string['title'].strip()) + '@').strip().lower()
search_results = \
self.plugin.manager.get_all_objects(Song, Song.search_title == temp, Song.search_title.asc())
else:
search_results = self.plugin.manager.get_all_objects( search_results = self.plugin.manager.get_all_objects(
Song, Song.search_title == item.data_string['title'], Song.search_title.asc()) Song, Song.search_title == item.data_string['title'], Song.search_title.asc())
edit_id = 0 edit_id = 0