~phill-ridout/openlp/path_edit

« back to all changes in this revision

Viewing changes to openlp/plugins/songs/lib/__init__.py

  • Committer: Tim Bentley
  • Author(s): tomasgroth at yahoo
  • Date: 2017-01-20 21:42:01 UTC
  • mfrom: (2714.3.4 sb-vps-import-fixes)
  • Revision ID: tim.bentley@gmail.com-20170120214201-2bvkpns82mi5fdwx
Clean search lyrics for formatting tags. Fixes bug #1655988.
Fix an issue with easyslide import not handling verse order correctly. Fixes bug #1655985.
Improve the songbeamer encoding detection. Fixes bug #1530597.
Handle a few videopsalm quirks. Fixes bug #1652851.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
from PyQt5 import QtWidgets
31
31
 
32
32
from openlp.core.common import AppLocation, CONTROL_CHARS
33
 
from openlp.core.lib import translate
 
33
from openlp.core.lib import translate, clean_tags
34
34
from openlp.plugins.songs.lib.db import Author, MediaFile, Song, Topic
35
35
from openlp.plugins.songs.lib.ui import SongStrings
36
36
 
380
380
    if isinstance(song.lyrics, bytes):
381
381
        song.lyrics = str(song.lyrics, encoding='utf8')
382
382
    verses = SongXML().get_verses(song.lyrics)
383
 
    song.search_lyrics = ' '.join([clean_string(verse[1]) for verse in verses])
 
383
    song.search_lyrics = ' '.join([clean_string(clean_tags(verse[1])) for verse in verses])
384
384
    # The song does not have any author, add one.
385
385
    if not song.authors_songs:
386
386
        name = SongStrings.AuthorUnknown