From e45e0beaaedd9f95a8ad606101ddb1ef320117c0 Mon Sep 17 00:00:00 2001 From: Carlos Guzman Date: Sat, 14 Nov 2020 15:56:21 -0500 Subject: [PATCH] [plugin.googledrive] 1.4.10 (#3211) --- plugin.googledrive/addon.xml | 9 ++++----- .../language/resource.language.en_gb/strings.po | 4 ++++ .../resources/lib/provider/googledrive.py | 10 ++++++---- plugin.googledrive/resources/settings.xml | 1 + 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/plugin.googledrive/addon.xml b/plugin.googledrive/addon.xml index a243d879db..23b6190479 100644 --- a/plugin.googledrive/addon.xml +++ b/plugin.googledrive/addon.xml @@ -1,8 +1,8 @@ - + - + image audio video @@ -41,9 +41,8 @@ Play all your media from Google Drive including Videos, Music and Pictures (incl fanart.jpg -v1.4.3 released Oct 11, 2020: -- New export functionality -- Multiple fixes +v1.4.10 released Nov 12, 2020: +- Export improvements This cloud drive addon uses a third-party authentication mechanism commonly known as OAuth 2.0. diff --git a/plugin.googledrive/resources/language/resource.language.en_gb/strings.po b/plugin.googledrive/resources/language/resource.language.en_gb/strings.po index 5055c96ed1..624de9cb63 100644 --- a/plugin.googledrive/resources/language/resource.language.en_gb/strings.po +++ b/plugin.googledrive/resources/language/resource.language.en_gb/strings.po @@ -96,6 +96,10 @@ msgctxt "#32019" msgid "Do not include filename extension in a .strm" msgstr "" +msgctxt "#32020" +msgid "Hide exporting progress dialog" +msgstr "" + msgctxt "#32030" msgid "Collaboration" msgstr "" diff --git a/plugin.googledrive/resources/lib/provider/googledrive.py b/plugin.googledrive/resources/lib/provider/googledrive.py index ce4542ed8c..3d48a9076c 100644 --- a/plugin.googledrive/resources/lib/provider/googledrive.py +++ b/plugin.googledrive/resources/lib/provider/googledrive.py @@ -116,7 +116,7 @@ def _get_field_parameters(self): file_fileds = file_fileds + ',description,hasThumbnail,thumbnailLink,owners(permissionId),parents,trashed,imageMediaMetadata(width),videoMediaMetadata,shortcutDetails' return file_fileds - def get_folder_items(self, item_driveid=None, item_id=None, path=None, on_items_page_completed=None, include_download_info=False): + def get_folder_items(self, item_driveid=None, item_id=None, path=None, on_items_page_completed=None, include_download_info=False, on_before_add_item=None): item_driveid = Utils.default(item_driveid, self._driveid) is_album = item_id and item_id[:6] == 'album-' if is_album: @@ -163,7 +163,7 @@ def get_folder_items(self, item_driveid=None, item_id=None, path=None, on_items_ files = provider_method(url, parameters = parameters) if self.cancel_operation(): return - items.extend(self.process_files(files, parameters, on_items_page_completed, include_download_info)) + items.extend(self.process_files(files, parameters, on_items_page_completed, include_download_info, on_before_add_item=on_before_add_item)) return items def search(self, query, item_driveid=None, item_id=None, on_items_page_completed=None): @@ -180,7 +180,7 @@ def search(self, query, item_driveid=None, item_id=None, on_items_page_completed return return self.process_files(files, parameters, on_items_page_completed) - def process_files(self, files, parameters, on_items_page_completed=None, include_download_info=False, extra_info=None): + def process_files(self, files, parameters, on_items_page_completed=None, include_download_info=False, extra_info=None, on_before_add_item=None): items = [] if files: kind = Utils.get_safe_value(files, 'kind', '') @@ -200,6 +200,8 @@ def process_files(self, files, parameters, on_items_page_completed=None, include f['kind'] = Utils.get_safe_value(f, 'kind', kind) item = self._extract_item(f, include_download_info) if item: + if on_before_add_item: + on_before_add_item(item) items.append(item) if on_items_page_completed: on_items_page_completed(items) @@ -221,7 +223,7 @@ def process_files(self, files, parameters, on_items_page_completed=None, include next_files = provider_method(url, parameters = parameters) if self.cancel_operation(): return - items.extend(self.process_files(next_files, parameters, on_items_page_completed, include_download_info, extra_info)) + items.extend(self.process_files(next_files, parameters, on_items_page_completed, include_download_info, extra_info, on_before_add_item)) return items def _extract_item(self, f, include_download_info=False): diff --git a/plugin.googledrive/resources/settings.xml b/plugin.googledrive/resources/settings.xml index 88bed1aad5..236634de0c 100644 --- a/plugin.googledrive/resources/settings.xml +++ b/plugin.googledrive/resources/settings.xml @@ -11,6 +11,7 @@ +