[grilo-mediaserver2] Use source's name as title for root container
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-mediaserver2] Use source's name as title for root container
- Date: Sun, 10 Jun 2012 21:30:56 +0000 (UTC)
commit c22046532f1cccf7a0dd06bfc776f1dcff11da95
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Sun Jun 10 21:29:27 2012 +0000
Use source's name as title for root container
Just in case the root media does not have a title.
src/grilo-mediaserver2.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/grilo-mediaserver2.c b/src/grilo-mediaserver2.c
index 9f25be8..b6a22a4 100644
--- a/src/grilo-mediaserver2.c
+++ b/src/grilo-mediaserver2.c
@@ -419,6 +419,13 @@ metadata_cb (GrlMediaSource *source,
return;
}
+ /* Special case: for root media, if there is no title use the source's name */
+ if (grl_media_get_id (media) == NULL &&
+ !grl_data_has_key (GRL_DATA (media), GRL_METADATA_KEY_TITLE)) {
+ grl_media_set_title (media,
+ grl_metadata_source_get_name (GRL_METADATA_SOURCE (source)));
+ }
+
grdata->properties = ms2_server_new_properties_hashtable ();
fill_properties_table (grdata->server,
grdata->properties,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]