From e9a151cec0ab8e765377278d2f4451c883e47de9 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Mon, 27 Oct 2014 14:14:12 +0100 Subject: [PATCH] This fixes the adding of images and media to the media manager. Copied from lp:~rafaellerm/openlp/media_import_fix --- openlp/core/lib/listwidgetwithdnd.py | 2 +- openlp/core/lib/treewidgetwithdnd.py | 2 +- openlp/core/ui/media/mediacontroller.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openlp/core/lib/listwidgetwithdnd.py b/openlp/core/lib/listwidgetwithdnd.py index 2618d13c3..cbedbc79c 100644 --- a/openlp/core/lib/listwidgetwithdnd.py +++ b/openlp/core/lib/listwidgetwithdnd.py @@ -109,6 +109,6 @@ class ListWidgetWithDnD(QtGui.QListWidget): listing = os.listdir(local_file) for file in listing: files.append(os.path.join(local_file, file)) - Registry().execute('%s_dnd' % self.mime_data_text, files) + Registry().execute('%s_dnd' % self.mime_data_text, {'files': files, 'target': self.itemAt(event.pos())}) else: event.ignore() diff --git a/openlp/core/lib/treewidgetwithdnd.py b/openlp/core/lib/treewidgetwithdnd.py index cdb6cbbdb..0bdd664e8 100644 --- a/openlp/core/lib/treewidgetwithdnd.py +++ b/openlp/core/lib/treewidgetwithdnd.py @@ -127,7 +127,7 @@ class TreeWidgetWithDnD(QtGui.QTreeWidget): listing = os.listdir(local_file) for file_name in listing: files.append(os.path.join(local_file, file_name)) - Registry().execute('%s_dnd' % self.mime_Data_Text, {'files': files, 'target': self.itemAt(event.pos())}) + Registry().execute('%s_dnd' % self.mime_data_text, {'files': files, 'target': self.itemAt(event.pos())}) elif self.allow_internal_dnd: event.setDropAction(QtCore.Qt.CopyAction) event.accept() diff --git a/openlp/core/ui/media/mediacontroller.py b/openlp/core/ui/media/mediacontroller.py index 4a2d475c1..e3517ba0f 100644 --- a/openlp/core/ui/media/mediacontroller.py +++ b/openlp/core/ui/media/mediacontroller.py @@ -146,7 +146,7 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): if player.is_active: for item in player.video_extensions_list: if item not in self.video_extensions_list: - self.video_extensions_list.extend(item) + self.video_extensions_list.append(item) suffix_list.append(item[2:]) self.service_manager.supported_suffixes(suffix_list)