diff options
author | Juan A. Suarez Romero <jasuarez@igalia.com> | 2014-07-30 19:13:44 +0000 |
---|---|---|
committer | Juan A. Suarez Romero <jasuarez@igalia.com> | 2014-07-30 19:31:38 +0000 |
commit | 9cbfb0a3f5eb88ed99a345cab3a06e11673031a6 (patch) | |
tree | e39d8f4f0a2914b146421748b7857c3e582a7ee6 /src/grl-source.c | |
parent | aba1bb4fcd3fd3570de0f7cad630a5fab6ae463d (diff) | |
download | grilo-9cbfb0a3f5eb88ed99a345cab3a06e11673031a6.tar.gz |
core: Append source ID in media_from_uri operation
If the source resolving the URI does not add the source-id, let's do it in the
core instead.
We always want the media coming with the source-id.
Diffstat (limited to 'src/grl-source.c')
-rw-r--r-- | src/grl-source.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/grl-source.c b/src/grl-source.c index d2389ad..19e23dd 100644 --- a/src/grl-source.c +++ b/src/grl-source.c @@ -1900,6 +1900,11 @@ media_from_uri_result_relay_cb (GrlSource *source, /* Free specs */ media_from_uri_spec_free (rrc->spec.mfu); + /* Append the source-id in case it is not set */ + if (media && !grl_data_get_string (GRL_DATA (media), GRL_METADATA_KEY_SOURCE)) { + grl_data_set_string (GRL_DATA (media), GRL_METADATA_KEY_SOURCE, grl_source_get_id (source)); + } + /* Check if cancelled */ if (operation_is_cancelled (rrc->operation_id)) { /* if the plugin already set an error, we don't care because we're |