[grilo] core: Append source ID in media_from_uri operation
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] core: Append source ID in media_from_uri operation
- Date: Wed, 30 Jul 2014 19:34:32 +0000 (UTC)
commit 9cbfb0a3f5eb88ed99a345cab3a06e11673031a6
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Wed Jul 30 19:13:44 2014 +0000
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.
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]