diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index 99a42e3cf..fab50b4dc 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -475,11 +475,18 @@ class MediaManagerItem(QtGui.QWidget): translate('OpenLP.MediaManagerItem', 'You must select one or more items to send live.')) else: - log.debug(u'%s Live requested', self.plugin.name) - serviceItem = self.buildServiceItem() - if serviceItem: - serviceItem.from_plugin = True - self.parent.liveController.addServiceItem(serviceItem) + self.goLive() + + def goLive(self, item_id=None): + log.debug(u'%s Live requested', self.plugin.name) + item = None + if item_id: + item = QtGui.QListWidgetItem() + item.setData(QtCore.Qt.UserRole, QtCore.QVariant(item_id)) + serviceItem = self.buildServiceItem(item) + if serviceItem: + serviceItem.from_plugin = True + self.parent.liveController.addServiceItem(serviceItem) def onAddClick(self): """ @@ -573,3 +580,16 @@ class MediaManagerItem(QtGui.QWidget): else: item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0] return item_id + + def hasSearch(self): + """ + Returns whether this plugin supports the search method + """ + return False + + def search(self, string): + """ + Performs a plugin specific search for items containing ``string`` + """ + raise NotImplementedError( + u'Plugin.about needs to be defined by the plugin') diff --git a/openlp/core/lib/pluginmanager.py b/openlp/core/lib/pluginmanager.py index 0fddc75c4..3e1620378 100644 --- a/openlp/core/lib/pluginmanager.py +++ b/openlp/core/lib/pluginmanager.py @@ -45,7 +45,7 @@ class PluginManager(object): """ The constructor for the plugin manager. Passes the controllers on to the plugins for them to interact with via their ServiceItems. - +pluginmanager.py ``plugin_dir`` The directory to search for plugins. """ @@ -211,3 +211,12 @@ class PluginManager(object): if plugin.isActive(): plugin.finalise() log.info(u'Finalisation Complete for %s ' % plugin.name) + + def get_plugin_by_name(self, name): + """ + Return the plugin which has a name with value ``name`` + """ + for plugin in self.plugins: + if plugin.name == name: + return plugin + return None diff --git a/openlp/plugins/remotes/html/index.html b/openlp/plugins/remotes/html/index.html index 3708db654..bbb0644c3 100644 --- a/openlp/plugins/remotes/html/index.html +++ b/openlp/plugins/remotes/html/index.html @@ -43,6 +43,7 @@ Service Manager Slide Controller Alerts + Search @@ -55,7 +56,7 @@