~openlp-core/openlp/2.4

« back to all changes in this revision

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

  • Committer: Tomas Groth
  • Author(s): tomasgroth at yahoo
  • Date: 2017-01-22 21:21:47 UTC
  • mfrom: (2665.1.2 song-import-fixes24)
  • Revision ID: tomasgroth@yahoo.dk-20170122212147-da43cite4xi5xz4w
Fixes:
Bug #1487788: Importing photos does not give focus to OpenLP
Bug #1512040: Loop tooltip gets stuck to "Stop playing..."
Bug #1624661: Missing DB in unmounted disk results in Traceback
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
33
 
from openlp.core.lib import translate
 
33
from openlp.core.lib import translate, clean_tags
34
34
from openlp.core.utils import CONTROL_CHARS
35
35
from openlp.plugins.songs.lib.db import Author, MediaFile, Song, Topic
36
36
from openlp.plugins.songs.lib.ui import SongStrings
381
381
    if isinstance(song.lyrics, bytes):
382
382
        song.lyrics = str(song.lyrics, encoding='utf8')
383
383
    verses = SongXML().get_verses(song.lyrics)
384
 
    song.search_lyrics = ' '.join([clean_string(verse[1]) for verse in verses])
 
384
    song.search_lyrics = ' '.join([clean_string(clean_tags(verse[1])) for verse in verses])
385
385
    # The song does not have any author, add one.
386
386
    if not song.authors_songs:
387
387
        name = SongStrings.AuthorUnknown