← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/vlc-fixes into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/vlc-fixes into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~trb143/openlp/vlc-fixes/+merge/121277

A saved media item in a service is not case insensitive checked for a valid suffix on reloading so it is not allowed to be played.

Fix up some API comments as well 
-- 
https://code.launchpad.net/~trb143/openlp/vlc-fixes/+merge/121277
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/vlc-fixes into lp:openlp.
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py	2012-07-07 14:54:14 +0000
+++ openlp/core/ui/servicemanager.py	2012-08-24 20:09:19 +0000
@@ -379,6 +379,12 @@
             QtCore.QVariant(u'False')).toBool()
 
     def supportedSuffixes(self, suffix):
+        """
+        Adds Suffixes supported to the master list.  Called from Plugins.
+
+        ``suffix``
+            New Suffix to be supported
+        """
         self.suffixes.append(suffix)
 
     def onNewServiceClicked(self):
@@ -795,6 +801,10 @@
             self.repaintServiceList(item, -1)
 
     def onServiceItemEditForm(self):
+        """
+        Opens a dialog to edit the service item and update the service
+        display if changes are saved.
+        """
         item = self.findServiceItem()[0]
         self.serviceItemEditForm.setServiceItem(
             self.serviceItems[item][u'service_item'])
@@ -805,7 +815,7 @@
     def previewLive(self, message):
         """
         Called by the SlideController to request a preview item be made live
-        and allows the next preview to be updated if relevent.
+        and allows the next preview to be updated if relevant.
         """
         uuid, row = message.split(u':')
         for sitem in self.serviceItems:
@@ -1082,12 +1092,12 @@
         """
         if serviceItem.is_command():
             type = serviceItem._raw_frames[0][u'title'].split(u'.')[-1]
-            if type not in self.suffixes:
+            if type.lower() not in self.suffixes:
                 serviceItem.is_valid = False
 
     def cleanUp(self):
         """
-        Empties the servicePath of temporary files.
+        Empties the servicePath of temporary files on system exit.
         """
         log.debug(u'Cleaning up servicePath')
         for file in os.listdir(self.servicePath):


Follow ups