diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 510a94dfd..d9c8111bb 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -305,10 +305,10 @@ class Ui_MainWindow(object): add_actions(self.fileExportMenu, (self.exportThemeItem, self.exportLanguageItem)) add_actions(self.fileMenu, (self.fileNewItem, self.fileOpenItem, - self.fileSaveItem, self.fileSaveAsItem, None, - self.recentFilesMenu.menuAction(), None, self.printServiceOrderItem, - None, self.fileImportMenu.menuAction(), - self.fileExportMenu.menuAction(), self.fileExitItem)) + self.fileSaveItem, self.fileSaveAsItem, + self.recentFilesMenu.menuAction(), None, + self.fileImportMenu.menuAction(), self.fileExportMenu.menuAction(), + None, self.printServiceOrderItem, self.fileExitItem)) add_actions(self.viewModeMenu, (self.modeDefaultItem, self.modeSetupItem, self.modeLiveItem)) add_actions(self.viewMenu, (self.viewModeMenu.menuAction(), diff --git a/openlp/plugins/songs/lib/songshowplusimport.py b/openlp/plugins/songs/lib/songshowplusimport.py index 7f7527c6d..c50df8752 100644 --- a/openlp/plugins/songs/lib/songshowplusimport.py +++ b/openlp/plugins/songs/lib/songshowplusimport.py @@ -102,7 +102,6 @@ class SongShowPlusImport(SongImport): if not isinstance(self.import_source, list): return self.import_wizard.progressBar.setMaximum(len(self.import_source)) - for file in self.import_source: self.sspVerseOrderList = [] otherCount = 0 @@ -111,7 +110,6 @@ class SongShowPlusImport(SongImport): self.import_wizard.incrementProgressBar( WizardStrings.ImportingType % file_name, 0) songData = open(file, 'rb') - while True: blockKey, = struct.unpack("I", songData.read(4)) # The file ends with 4 NUL's @@ -126,8 +124,9 @@ class SongShowPlusImport(SongImport): songData.read(2)) verseName = songData.read(verseNameLength) lengthDescriptorSize, = struct.unpack("B", songData.read(1)) + log.debug(lengthDescriptorSize) # Detect if/how long the length descriptor is - if lengthDescriptorSize == 12: + if lengthDescriptorSize == 12 or lengthDescriptorSize == 20: lengthDescriptor, = struct.unpack("I", songData.read(4)) elif lengthDescriptorSize == 2: lengthDescriptor = 1 @@ -135,6 +134,7 @@ class SongShowPlusImport(SongImport): lengthDescriptor = 0 else: lengthDescriptor, = struct.unpack("B", songData.read(1)) + log.debug(lengthDescriptorSize) data = songData.read(lengthDescriptor) if blockKey == TITLE: self.title = unicode(data, u'cp1252')