Commit f76000d7 authored by Thibault Saunier's avatar Thibault Saunier
Browse files

uri-asset: Let a chance for user to change URI if the set one is not readable

It sounds like the most logical thing to do in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=721111
parent f4ce6dca
...@@ -461,8 +461,9 @@ ges_project_try_updating_id (GESProject * project, GESAsset * asset, ...@@ -461,8 +461,9 @@ ges_project_try_updating_id (GESProject * project, GESAsset * asset,
id = ges_asset_get_id (asset); id = ges_asset_get_id (asset);
GST_DEBUG_OBJECT (project, "Try to proxy %s", id); GST_DEBUG_OBJECT (project, "Try to proxy %s", id);
if (ges_asset_request_id_update (asset, &new_id, error) == FALSE) { if (ges_asset_request_id_update (asset, &new_id, error) == FALSE) {
GST_DEBUG_OBJECT (project, "Type: %s can not be proxied for id: %s", GST_DEBUG_OBJECT (project, "Type: %s can not be proxied for id: %s "
g_type_name (G_OBJECT_TYPE (asset)), id); "and error: %s", g_type_name (G_OBJECT_TYPE (asset)), id,
error->message);
_send_error_loading_asset (project, asset, error); _send_error_loading_asset (project, asset, error);
return NULL; return NULL;
......
...@@ -128,7 +128,8 @@ static gboolean ...@@ -128,7 +128,8 @@ static gboolean
_request_id_update (GESAsset * self, gchar ** proposed_new_id, GError * error) _request_id_update (GESAsset * self, gchar ** proposed_new_id, GError * error)
{ {
if (error->domain == GST_RESOURCE_ERROR && if (error->domain == GST_RESOURCE_ERROR &&
error->code == GST_RESOURCE_ERROR_NOT_FOUND) { (error->code == GST_RESOURCE_ERROR_NOT_FOUND ||
error->code == GST_RESOURCE_ERROR_OPEN_READ)) {
const gchar *uri = ges_asset_get_id (self); const gchar *uri = ges_asset_get_id (self);
GFile *parent, *file = g_file_new_for_uri (uri); GFile *parent, *file = g_file_new_for_uri (uri);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment