~suutari-olli/openlp/escape-fixes-1294111-1497637

« back to all changes in this revision

Viewing changes to openlp/plugins/songs/lib/importers/wordsofworship.py

  • Committer: suutari-olli
  • Date: 2016-01-07 02:53:59 UTC
  • mfrom: (2557.2.31 openlp)
  • Revision ID: suutari.olli@gmail.com-20160107025359-q2feybbwxaoihqxr
Merge to trunk on 1/7/2015.

I noticed this branch also seems to be fixing this bug:
https://bugs.launchpad.net/openlp/+bug/1531691

However, escape item still remains buggy with problems related to resuming
video and presentations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
###############################################################################
5
5
# OpenLP - Open Source Lyrics Projection                                      #
6
6
# --------------------------------------------------------------------------- #
7
 
# Copyright (c) 2008-2015 OpenLP Developers                                   #
 
7
# Copyright (c) 2008-2016 OpenLP Developers                                   #
8
8
# --------------------------------------------------------------------------- #
9
9
# This program is free software; you can redistribute it and/or modify it     #
10
10
# under the terms of the GNU General Public License as published by the Free  #
108
108
                if song_data.read(19).decode() != 'WoW File\nSong Words':
109
109
                    self.log_error(source,
110
110
                                   str(translate('SongsPlugin.WordsofWorshipSongImport',
111
 
                                                 'Invalid Words of Worship song file. Missing "WoW File\\nSong '
112
 
                                                 'Words" header.')))
 
111
                                                 'Invalid Words of Worship song file. Missing "%s" header.'
 
112
                                                 % 'WoW File\\nSong Words')))
113
113
                    continue
114
114
                # Seek to byte which stores number of blocks in the song
115
115
                song_data.seek(56)
118
118
                if song_data.read(16).decode() != 'CSongDoc::CBlock':
119
119
                    self.log_error(source,
120
120
                                   str(translate('SongsPlugin.WordsofWorshipSongImport',
121
 
                                                 'Invalid Words of Worship song file. Missing "CSongDoc::CBlock" '
122
 
                                                 'string.')))
 
121
                                                 'Invalid Words of Worship song file. Missing "%s" '
 
122
                                                 'string.' % 'CSongDoc::CBlock')))
123
123
                    continue
124
124
                # Seek to the beginning of the first block
125
125
                song_data.seek(82)