summaryrefslogtreecommitdiff
path: root/libappstream-builder/plugins/asb-plugin-appdata.c
diff options
context:
space:
mode:
Diffstat (limited to 'libappstream-builder/plugins/asb-plugin-appdata.c')
-rw-r--r--libappstream-builder/plugins/asb-plugin-appdata.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libappstream-builder/plugins/asb-plugin-appdata.c b/libappstream-builder/plugins/asb-plugin-appdata.c
index 5cf9475..56d296f 100644
--- a/libappstream-builder/plugins/asb-plugin-appdata.c
+++ b/libappstream-builder/plugins/asb-plugin-appdata.c
@@ -426,6 +426,16 @@ asb_plugin_process_filename (AsbPlugin *plugin,
if (image == NULL)
continue;
+ /* if no network just use the upstream location */
+ if (asb_context_get_flag (plugin->ctx,
+ ASB_CONTEXT_FLAG_NO_NETWORK)) {
+ asb_package_log (asb_app_get_package (app),
+ ASB_PACKAGE_LOG_LEVEL_DEBUG,
+ "Using upstream screenshot");
+ as_app_add_screenshot (AS_APP (app), ass);
+ continue;
+ }
+
/* load the URI or get from a cache */
tmp = as_image_get_url (image);
ret = asb_plugin_appdata_load_url (plugin,