forked from openlp/openlp
Fix song edit form and cleanups
bzr-revno: 1259
This commit is contained in:
commit
3109b4afb4
openlp
core/ui
plugins
@ -87,10 +87,10 @@ class Ui_MainWindow(object):
|
|||||||
self.screens, True)
|
self.screens, True)
|
||||||
previewVisible = QtCore.QSettings().value(
|
previewVisible = QtCore.QSettings().value(
|
||||||
u'user interface/preview panel', QtCore.QVariant(True)).toBool()
|
u'user interface/preview panel', QtCore.QVariant(True)).toBool()
|
||||||
self.previewController.Panel.setVisible(previewVisible)
|
self.previewController.panel.setVisible(previewVisible)
|
||||||
liveVisible = QtCore.QSettings().value(u'user interface/live panel',
|
liveVisible = QtCore.QSettings().value(u'user interface/live panel',
|
||||||
QtCore.QVariant(True)).toBool()
|
QtCore.QVariant(True)).toBool()
|
||||||
self.liveController.Panel.setVisible(liveVisible)
|
self.liveController.panel.setVisible(liveVisible)
|
||||||
# Create menu
|
# Create menu
|
||||||
self.MenuBar = QtGui.QMenuBar(mainWindow)
|
self.MenuBar = QtGui.QMenuBar(mainWindow)
|
||||||
self.MenuBar.setObjectName(u'MenuBar')
|
self.MenuBar.setObjectName(u'MenuBar')
|
||||||
@ -939,7 +939,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
True - Visible
|
True - Visible
|
||||||
False - Hidden
|
False - Hidden
|
||||||
"""
|
"""
|
||||||
self.previewController.Panel.setVisible(visible)
|
self.previewController.panel.setVisible(visible)
|
||||||
QtCore.QSettings().setValue(u'user interface/preview panel',
|
QtCore.QSettings().setValue(u'user interface/preview panel',
|
||||||
QtCore.QVariant(visible))
|
QtCore.QVariant(visible))
|
||||||
self.ViewPreviewPanel.setChecked(visible)
|
self.ViewPreviewPanel.setChecked(visible)
|
||||||
@ -954,7 +954,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
True - Visible
|
True - Visible
|
||||||
False - Hidden
|
False - Hidden
|
||||||
"""
|
"""
|
||||||
self.liveController.Panel.setVisible(visible)
|
self.liveController.panel.setVisible(visible)
|
||||||
QtCore.QSettings().setValue(u'user interface/live panel',
|
QtCore.QSettings().setValue(u'user interface/live panel',
|
||||||
QtCore.QVariant(visible))
|
QtCore.QVariant(visible))
|
||||||
self.ViewLivePanel.setChecked(visible)
|
self.ViewLivePanel.setChecked(visible)
|
||||||
|
@ -27,9 +27,8 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import save_cancel_button_box, translate
|
from openlp.core.lib import save_cancel_button_box, translate
|
||||||
from servicenotedialog import Ui_ServiceNoteEdit
|
|
||||||
|
|
||||||
class ServiceNoteForm(QtGui.QDialog, Ui_ServiceNoteEdit):
|
class ServiceNoteForm(QtGui.QDialog):
|
||||||
"""
|
"""
|
||||||
This is the form that is used to edit the verses of the song.
|
This is the form that is used to edit the verses of the song.
|
||||||
"""
|
"""
|
||||||
|
@ -77,14 +77,14 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.selectedRow = 0
|
self.selectedRow = 0
|
||||||
self.serviceItem = None
|
self.serviceItem = None
|
||||||
self.alertTab = None
|
self.alertTab = None
|
||||||
self.Panel = QtGui.QWidget(parent.ControlSplitter)
|
self.panel = QtGui.QWidget(parent.ControlSplitter)
|
||||||
self.slideList = {}
|
self.slideList = {}
|
||||||
# Layout for holding panel
|
# Layout for holding panel
|
||||||
self.panelLayout = QtGui.QVBoxLayout(self.Panel)
|
self.panelLayout = QtGui.QVBoxLayout(self.panel)
|
||||||
self.panelLayout.setSpacing(0)
|
self.panelLayout.setSpacing(0)
|
||||||
self.panelLayout.setMargin(0)
|
self.panelLayout.setMargin(0)
|
||||||
# Type label for the top of the slide controller
|
# Type label for the top of the slide controller
|
||||||
self.typeLabel = QtGui.QLabel(self.Panel)
|
self.typeLabel = QtGui.QLabel(self.panel)
|
||||||
if self.isLive:
|
if self.isLive:
|
||||||
self.typeLabel.setText(translate('OpenLP.SlideController', 'Live'))
|
self.typeLabel.setText(translate('OpenLP.SlideController', 'Live'))
|
||||||
self.split = 1
|
self.split = 1
|
||||||
@ -98,7 +98,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.typeLabel.setAlignment(QtCore.Qt.AlignCenter)
|
self.typeLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
self.panelLayout.addWidget(self.typeLabel)
|
self.panelLayout.addWidget(self.typeLabel)
|
||||||
# Splitter
|
# Splitter
|
||||||
self.splitter = QtGui.QSplitter(self.Panel)
|
self.splitter = QtGui.QSplitter(self.panel)
|
||||||
self.splitter.setOrientation(QtCore.Qt.Vertical)
|
self.splitter.setOrientation(QtCore.Qt.Vertical)
|
||||||
self.panelLayout.addWidget(self.splitter)
|
self.panelLayout.addWidget(self.splitter)
|
||||||
# Actual controller section
|
# Actual controller section
|
||||||
@ -185,13 +185,13 @@ class SlideController(QtGui.QWidget):
|
|||||||
u'Stop Loop', u':/media/media_stop.png',
|
u'Stop Loop', u':/media/media_stop.png',
|
||||||
translate('OpenLP.SlideController', 'Stop continuous loop'),
|
translate('OpenLP.SlideController', 'Stop continuous loop'),
|
||||||
self.onStopLoop)
|
self.onStopLoop)
|
||||||
self.DelaySpinBox = QtGui.QSpinBox()
|
self.delaySpinBox = QtGui.QSpinBox()
|
||||||
self.DelaySpinBox.setMinimum(1)
|
self.delaySpinBox.setMinimum(1)
|
||||||
self.DelaySpinBox.setMaximum(180)
|
self.delaySpinBox.setMaximum(180)
|
||||||
self.toolbar.addToolbarWidget(u'Image SpinBox', self.DelaySpinBox)
|
self.toolbar.addToolbarWidget(u'Image SpinBox', self.delaySpinBox)
|
||||||
self.DelaySpinBox.setSuffix(translate('OpenLP.SlideController',
|
self.delaySpinBox.setSuffix(translate('OpenLP.SlideController',
|
||||||
's'))
|
's'))
|
||||||
self.DelaySpinBox.setToolTip(translate('OpenLP.SlideController',
|
self.delaySpinBox.setToolTip(translate('OpenLP.SlideController',
|
||||||
'Delay between slides in seconds'))
|
'Delay between slides in seconds'))
|
||||||
else:
|
else:
|
||||||
self.toolbar.addToolbarSeparator(u'Close Separator')
|
self.toolbar.addToolbarSeparator(u'Close Separator')
|
||||||
@ -486,7 +486,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.onSlideSelected()
|
self.onSlideSelected()
|
||||||
|
|
||||||
def receiveSpinDelay(self, value):
|
def receiveSpinDelay(self, value):
|
||||||
self.DelaySpinBox.setValue(int(value))
|
self.delaySpinBox.setValue(int(value))
|
||||||
|
|
||||||
def enableToolBar(self, item):
|
def enableToolBar(self, item):
|
||||||
"""
|
"""
|
||||||
@ -998,7 +998,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
if self.previewListWidget.rowCount() > 1:
|
if self.previewListWidget.rowCount() > 1:
|
||||||
self.timer_id = self.startTimer(
|
self.timer_id = self.startTimer(
|
||||||
int(self.DelaySpinBox.value()) * 1000)
|
int(self.delaySpinBox.value()) * 1000)
|
||||||
self.toolbar.actions[u'Stop Loop'].setVisible(True)
|
self.toolbar.actions[u'Stop Loop'].setVisible(True)
|
||||||
self.toolbar.actions[u'Start Loop'].setVisible(False)
|
self.toolbar.actions[u'Start Loop'].setVisible(False)
|
||||||
|
|
||||||
|
@ -29,12 +29,11 @@ from PyQt4 import QtCore, QtGui
|
|||||||
from openlp.core.lib import translate, build_icon
|
from openlp.core.lib import translate, build_icon
|
||||||
|
|
||||||
class Ui_ThemeWizard(object):
|
class Ui_ThemeWizard(object):
|
||||||
def setupUi(self, ThemeWizard):
|
def setupUi(self, themeWizard):
|
||||||
ThemeWizard.setObjectName(u'OpenLP.ThemeWizard')
|
themeWizard.setObjectName(u'OpenLP.ThemeWizard')
|
||||||
ThemeWizard.setModal(True)
|
themeWizard.setModal(True)
|
||||||
ThemeWizard.setWizardStyle(QtGui.QWizard.ModernStyle)
|
themeWizard.setWizardStyle(QtGui.QWizard.ModernStyle)
|
||||||
ThemeWizard.setOptions(
|
themeWizard.setOptions(QtGui.QWizard.IndependentPages |
|
||||||
QtGui.QWizard.IndependentPages |
|
|
||||||
QtGui.QWizard.NoBackButtonOnStartPage)
|
QtGui.QWizard.NoBackButtonOnStartPage)
|
||||||
# Welcome Page
|
# Welcome Page
|
||||||
self.welcomePage = QtGui.QWizardPage()
|
self.welcomePage = QtGui.QWizardPage()
|
||||||
@ -52,7 +51,7 @@ class Ui_ThemeWizard(object):
|
|||||||
self.informationLabel.setObjectName(u'InformationLabel')
|
self.informationLabel.setObjectName(u'InformationLabel')
|
||||||
self.welcomeLayout.addWidget(self.informationLabel)
|
self.welcomeLayout.addWidget(self.informationLabel)
|
||||||
self.welcomeLayout.addStretch()
|
self.welcomeLayout.addStretch()
|
||||||
ThemeWizard.addPage(self.welcomePage)
|
themeWizard.addPage(self.welcomePage)
|
||||||
# Background Page
|
# Background Page
|
||||||
self.backgroundPage = QtGui.QWizardPage()
|
self.backgroundPage = QtGui.QWizardPage()
|
||||||
self.backgroundPage.setObjectName(u'BackgroundPage')
|
self.backgroundPage.setObjectName(u'BackgroundPage')
|
||||||
@ -142,7 +141,7 @@ class Ui_ThemeWizard(object):
|
|||||||
self.imageSpacer)
|
self.imageSpacer)
|
||||||
self.backgroundStack.addWidget(self.imageWidget)
|
self.backgroundStack.addWidget(self.imageWidget)
|
||||||
self.backgroundLayout.addLayout(self.backgroundStack)
|
self.backgroundLayout.addLayout(self.backgroundStack)
|
||||||
ThemeWizard.addPage(self.backgroundPage)
|
themeWizard.addPage(self.backgroundPage)
|
||||||
# Main Area Page
|
# Main Area Page
|
||||||
self.mainAreaPage = QtGui.QWizardPage()
|
self.mainAreaPage = QtGui.QWizardPage()
|
||||||
self.mainAreaPage.setObjectName(u'MainAreaPage')
|
self.mainAreaPage.setObjectName(u'MainAreaPage')
|
||||||
@ -225,7 +224,7 @@ class Ui_ThemeWizard(object):
|
|||||||
self.shadowSizeSpinBox.setObjectName(u'ShadowSizeSpinBox')
|
self.shadowSizeSpinBox.setObjectName(u'ShadowSizeSpinBox')
|
||||||
self.shadowLayout.addWidget(self.shadowSizeSpinBox)
|
self.shadowLayout.addWidget(self.shadowSizeSpinBox)
|
||||||
self.mainAreaLayout.addRow(self.shadowCheckBox, self.shadowLayout)
|
self.mainAreaLayout.addRow(self.shadowCheckBox, self.shadowLayout)
|
||||||
ThemeWizard.addPage(self.mainAreaPage)
|
themeWizard.addPage(self.mainAreaPage)
|
||||||
# Footer Area Page
|
# Footer Area Page
|
||||||
self.footerAreaPage = QtGui.QWizardPage()
|
self.footerAreaPage = QtGui.QWizardPage()
|
||||||
self.footerAreaPage.setObjectName(u'FooterAreaPage')
|
self.footerAreaPage.setObjectName(u'FooterAreaPage')
|
||||||
@ -251,7 +250,7 @@ class Ui_ThemeWizard(object):
|
|||||||
self.footerSizeSpinBox.setObjectName(u'FooterSizeSpinBox')
|
self.footerSizeSpinBox.setObjectName(u'FooterSizeSpinBox')
|
||||||
self.footerAreaLayout.addRow(self.footerSizeLabel,
|
self.footerAreaLayout.addRow(self.footerSizeLabel,
|
||||||
self.footerSizeSpinBox)
|
self.footerSizeSpinBox)
|
||||||
ThemeWizard.addPage(self.footerAreaPage)
|
themeWizard.addPage(self.footerAreaPage)
|
||||||
# Alignment Page
|
# Alignment Page
|
||||||
self.alignmentPage = QtGui.QWizardPage()
|
self.alignmentPage = QtGui.QWizardPage()
|
||||||
self.alignmentPage.setObjectName(u'AlignmentPage')
|
self.alignmentPage.setObjectName(u'AlignmentPage')
|
||||||
@ -276,7 +275,7 @@ class Ui_ThemeWizard(object):
|
|||||||
self.transitionsCheckBox.setObjectName(u'TransitionsCheckBox')
|
self.transitionsCheckBox.setObjectName(u'TransitionsCheckBox')
|
||||||
self.alignmentLayout.addRow(self.transitionsLabel,
|
self.alignmentLayout.addRow(self.transitionsLabel,
|
||||||
self.transitionsCheckBox)
|
self.transitionsCheckBox)
|
||||||
ThemeWizard.addPage(self.alignmentPage)
|
themeWizard.addPage(self.alignmentPage)
|
||||||
# Area Position Page
|
# Area Position Page
|
||||||
self.areaPositionPage = QtGui.QWizardPage()
|
self.areaPositionPage = QtGui.QWizardPage()
|
||||||
self.areaPositionPage.setObjectName(u'AreaPositionPage')
|
self.areaPositionPage.setObjectName(u'AreaPositionPage')
|
||||||
@ -352,7 +351,7 @@ class Ui_ThemeWizard(object):
|
|||||||
self.footerPositionLayout.addRow(self.footerHeightLabel,
|
self.footerPositionLayout.addRow(self.footerHeightLabel,
|
||||||
self.footerHeightSpinBox)
|
self.footerHeightSpinBox)
|
||||||
self.areaPositionLayout.addWidget(self.footerPositionGroupBox)
|
self.areaPositionLayout.addWidget(self.footerPositionGroupBox)
|
||||||
ThemeWizard.addPage(self.areaPositionPage)
|
themeWizard.addPage(self.areaPositionPage)
|
||||||
# Preview Page
|
# Preview Page
|
||||||
self.previewPage = QtGui.QWizardPage()
|
self.previewPage = QtGui.QWizardPage()
|
||||||
self.previewPage.setObjectName(u'PreviewPage')
|
self.previewPage.setObjectName(u'PreviewPage')
|
||||||
@ -381,9 +380,8 @@ class Ui_ThemeWizard(object):
|
|||||||
self.previewBoxLabel.setObjectName(u'PreviewBoxLabel')
|
self.previewBoxLabel.setObjectName(u'PreviewBoxLabel')
|
||||||
self.previewAreaLayout.addWidget(self.previewBoxLabel)
|
self.previewAreaLayout.addWidget(self.previewBoxLabel)
|
||||||
self.previewLayout.addWidget(self.previewArea)
|
self.previewLayout.addWidget(self.previewArea)
|
||||||
ThemeWizard.addPage(self.previewPage)
|
themeWizard.addPage(self.previewPage)
|
||||||
|
self.retranslateUi(themeWizard)
|
||||||
self.retranslateUi(ThemeWizard)
|
|
||||||
QtCore.QObject.connect(self.backgroundComboBox,
|
QtCore.QObject.connect(self.backgroundComboBox,
|
||||||
QtCore.SIGNAL(u'currentIndexChanged(int)'), self.backgroundStack,
|
QtCore.SIGNAL(u'currentIndexChanged(int)'), self.backgroundStack,
|
||||||
QtCore.SLOT(u'setCurrentIndex(int)'))
|
QtCore.SLOT(u'setCurrentIndex(int)'))
|
||||||
@ -423,10 +421,10 @@ class Ui_ThemeWizard(object):
|
|||||||
QtCore.QObject.connect(self.footerPositionCheckBox,
|
QtCore.QObject.connect(self.footerPositionCheckBox,
|
||||||
QtCore.SIGNAL(u'toggled(bool)'), self.footerHeightSpinBox,
|
QtCore.SIGNAL(u'toggled(bool)'), self.footerHeightSpinBox,
|
||||||
QtCore.SLOT(u'setDisabled(bool)'))
|
QtCore.SLOT(u'setDisabled(bool)'))
|
||||||
QtCore.QMetaObject.connectSlotsByName(ThemeWizard)
|
QtCore.QMetaObject.connectSlotsByName(themeWizard)
|
||||||
|
|
||||||
def retranslateUi(self, ThemeWizard):
|
def retranslateUi(self, themeWizard):
|
||||||
ThemeWizard.setWindowTitle(
|
themeWizard.setWindowTitle(
|
||||||
translate('OpenLP.ThemeWizard', 'Theme Wizard'))
|
translate('OpenLP.ThemeWizard', 'Theme Wizard'))
|
||||||
self.titleLabel.setText(
|
self.titleLabel.setText(
|
||||||
u'<span style="font-size:14pt; font-weight:600;">%s</span>' % \
|
u'<span style="font-size:14pt; font-weight:600;">%s</span>' % \
|
||||||
|
@ -525,7 +525,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
if self.advancedClearComboBox.currentIndex() == 0:
|
if self.advancedClearComboBox.currentIndex() == 0:
|
||||||
self.listView.clear()
|
self.listView.clear()
|
||||||
if self.listView.count() != 0:
|
if self.listView.count() != 0:
|
||||||
self.__checkSecondBible()
|
self.__checkSecondBible(bible, second_bible)
|
||||||
else:
|
else:
|
||||||
self.displayResults(bible, second_bible)
|
self.displayResults(bible, second_bible)
|
||||||
Receiver.send_message(u'cursor_normal')
|
Receiver.send_message(u'cursor_normal')
|
||||||
@ -565,14 +565,14 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
if self.quickClearComboBox.currentIndex() == 0:
|
if self.quickClearComboBox.currentIndex() == 0:
|
||||||
self.listView.clear()
|
self.listView.clear()
|
||||||
if self.listView.count() != 0 and self.search_results:
|
if self.listView.count() != 0 and self.search_results:
|
||||||
self.__checkSecondBible()
|
self.__checkSecondBible(bible, second_bible)
|
||||||
elif self.search_results:
|
elif self.search_results:
|
||||||
self.displayResults(bible, second_bible)
|
self.displayResults(bible, second_bible)
|
||||||
self.quickSearchButton.setEnabled(True)
|
self.quickSearchButton.setEnabled(True)
|
||||||
Receiver.send_message(u'cursor_normal')
|
Receiver.send_message(u'cursor_normal')
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
|
|
||||||
def __checkSecondBible(self):
|
def __checkSecondBible(self, bible, second_bible):
|
||||||
"""
|
"""
|
||||||
Check if the first item is a second bible item or not.
|
Check if the first item is a second bible item or not.
|
||||||
"""
|
"""
|
||||||
|
@ -648,6 +648,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
"""
|
"""
|
||||||
Free up autocompletion memory on dialog exit
|
Free up autocompletion memory on dialog exit
|
||||||
"""
|
"""
|
||||||
|
log.debug (u'SongEditForm.clearCaches')
|
||||||
self.authors = []
|
self.authors = []
|
||||||
self.themes = []
|
self.themes = []
|
||||||
self.books = []
|
self.books = []
|
||||||
@ -657,20 +658,21 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
"""
|
"""
|
||||||
Exit Dialog and do not save
|
Exit Dialog and do not save
|
||||||
"""
|
"""
|
||||||
|
log.debug (u'SongEditForm.reject')
|
||||||
Receiver.send_message(u'songs_edit_clear')
|
Receiver.send_message(u'songs_edit_clear')
|
||||||
self.clearCaches()
|
self.clearCaches()
|
||||||
self.close()
|
QtGui.QDialog.reject(self)
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
"""
|
"""
|
||||||
Exit Dialog and save song if valid
|
Exit Dialog and save song if valid
|
||||||
"""
|
"""
|
||||||
log.debug(u'accept')
|
log.debug(u'SongEditForm.accept')
|
||||||
self.clearCaches()
|
self.clearCaches()
|
||||||
if self._validate_song():
|
if self._validate_song():
|
||||||
self.saveSong()
|
self.saveSong()
|
||||||
Receiver.send_message(u'songs_load_list')
|
Receiver.send_message(u'songs_load_list')
|
||||||
self.close()
|
QtGui.QDialog.accept(self)
|
||||||
|
|
||||||
def saveSong(self, preview=False):
|
def saveSong(self, preview=False):
|
||||||
"""
|
"""
|
||||||
|
@ -94,8 +94,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
self.typeListWidget.setFocus()
|
self.typeListWidget.setFocus()
|
||||||
return QtGui.QDialog.exec_(self)
|
return QtGui.QDialog.exec_(self)
|
||||||
|
|
||||||
def _getCurrentItemId(self, ListWidget):
|
def _getCurrentItemId(self, listWidget):
|
||||||
item = ListWidget.currentItem()
|
item = listWidget.currentItem()
|
||||||
if item:
|
if item:
|
||||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
return item_id
|
return item_id
|
||||||
@ -390,13 +390,13 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
book.name = temp_name
|
book.name = temp_name
|
||||||
book.publisher = temp_publisher
|
book.publisher = temp_publisher
|
||||||
|
|
||||||
def __mergeObjects(self, object, merge, reset):
|
def __mergeObjects(self, dbObject, merge, reset):
|
||||||
"""
|
"""
|
||||||
Utility method to merge two objects to leave one in the database.
|
Utility method to merge two objects to leave one in the database.
|
||||||
"""
|
"""
|
||||||
Receiver.send_message(u'cursor_busy')
|
Receiver.send_message(u'cursor_busy')
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
merge(object)
|
merge(dbObject)
|
||||||
reset()
|
reset()
|
||||||
Receiver.send_message(u'songs_load_list')
|
Receiver.send_message(u'songs_load_list')
|
||||||
Receiver.send_message(u'cursor_normal')
|
Receiver.send_message(u'cursor_normal')
|
||||||
|
@ -140,25 +140,25 @@ class EasiSlidesImport(SongImport):
|
|||||||
``song``
|
``song``
|
||||||
The current song being imported.
|
The current song being imported.
|
||||||
"""
|
"""
|
||||||
copyright = []
|
copyright_list = []
|
||||||
self.__add_copyright_element(copyright, song.Copyright)
|
self.__add_copyright_element(copyright_list, song.Copyright)
|
||||||
self.__add_copyright_element(copyright, song.LicenceAdmin1)
|
self.__add_copyright_element(copyright_list, song.LicenceAdmin1)
|
||||||
self.__add_copyright_element(copyright, song.LicenceAdmin2)
|
self.__add_copyright_element(copyright_list, song.LicenceAdmin2)
|
||||||
self.add_copyright(u' '.join(copyright))
|
self.add_copyright(u' '.join(copyright_list))
|
||||||
|
|
||||||
def __add_copyright_element(self, copyright, element):
|
def __add_copyright_element(self, copyright_list, element):
|
||||||
"""
|
"""
|
||||||
Add a piece of copyright to the total copyright information for the
|
Add a piece of copyright to the total copyright information for the
|
||||||
song.
|
song.
|
||||||
|
|
||||||
``copyright``
|
``copyright_list``
|
||||||
The array to add the information to.
|
The array to add the information to.
|
||||||
|
|
||||||
``element``
|
``element``
|
||||||
The imported variable to get the data from.
|
The imported variable to get the data from.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
copyright.append(unicode(element).strip())
|
copyright_list.append(unicode(element).strip())
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
log.exception(u'Unicode error decoding %s' % element)
|
log.exception(u'Unicode error decoding %s' % element)
|
||||||
self._success = False
|
self._success = False
|
||||||
|
Loading…
Reference in New Issue
Block a user