Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVilém Duha <vilda.novak@gmail.com>2019-08-07 21:40:13 +0300
committerVilém Duha <vilda.novak@gmail.com>2019-08-07 21:46:26 +0300
commit3dbd6b5eab9a342abe7b33ee25c168ae117c4863 (patch)
tree1ae1379910f1a22c60639b3359b401249feea828 /blenderkit/download.py
parent53922bccf3c601820c4cb516b0ef46c0d00e7981 (diff)
BlenderKit: report error in rare case where URL of file couldn't be obtained(reupload of asset with old search results still in blender)
Diffstat (limited to 'blenderkit/download.py')
-rw-r--r--blenderkit/download.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/blenderkit/download.py b/blenderkit/download.py
index ac43bc88..37b2c8e6 100644
--- a/blenderkit/download.py
+++ b/blenderkit/download.py
@@ -536,7 +536,12 @@ class Downloader(threading.Thread):
api_key = self.api_key
# TODO get real link here...
- get_download_url(asset_data, scene_id, api_key, tcom=tcom)
+ has_url = get_download_url(asset_data, scene_id, api_key, tcom=tcom)
+
+ if not has_url:
+ tasks_queue.add_task(
+ (ui.add_report, ('Failed to obtain download URL for %s.' % asset_data['name'], 5, colors.RED)))
+ return;
if tcom.error:
return
# only now we can check if the file already exists. This should have 2 levels, for materials and for brushes