Skip to content

Commit

Permalink
[plugin.googledrive] 1.4.10 (xbmc#3211)
Browse files Browse the repository at this point in the history
  • Loading branch information
cguZZman authored Nov 14, 2020
1 parent 82480cb commit e45e0be
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
9 changes: 4 additions & 5 deletions plugin.googledrive/addon.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="plugin.googledrive" name="Google Drive" version="1.4.3" provider-name="Carlos Guzman (cguZZman)">
<addon id="plugin.googledrive" name="Google Drive" version="1.4.10" provider-name="Carlos Guzman (cguZZman)">
<requires>
<import addon="xbmc.python" version="2.25.0" />
<import addon="script.module.clouddrive.common" version="1.3.2"/>
<import addon="script.module.clouddrive.common" version="1.3.9"/>
</requires>
<extension point="xbmc.python.pluginsource" library="addon.py">
<provides>image audio video</provides>
Expand Down Expand Up @@ -41,9 +41,8 @@ Play all your media from Google Drive including Videos, Music and Pictures (incl
<fanart>fanart.jpg</fanart>
</assets>
<news>
v1.4.3 released Oct 11, 2020:
- New export functionality
- Multiple fixes
v1.4.10 released Nov 12, 2020:
- Export improvements
</news>
<disclaimer lang="en_GB">
This cloud drive addon uses a third-party authentication mechanism commonly known as OAuth 2.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down
10 changes: 6 additions & 4 deletions plugin.googledrive/resources/lib/provider/googledrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand All @@ -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', '')
Expand All @@ -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)
Expand All @@ -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):
Expand Down
1 change: 1 addition & 0 deletions plugin.googledrive/resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<setting label="32001" type="lsep"/>
<setting label="32003" type="bool" id="clean_folder" default="true" value="true"/>
<setting label="32019" type="bool" id="no_extension_strm" default="false" value="false"/>
<setting label="32020" type="bool" id="hide_export_progress" default="false" value="false"/>
<setting label="32002" type="lsep"/>
<setting label="32068" type="bool" id="allow_directory_listing" default="true"/>
<setting label="32069" type="number" id="port_directory_listing" default="8587"/>
Expand Down

0 comments on commit e45e0be

Please sign in to comment.