[grilo-plugins] [youtube] Ensure we always set the media id.
- From: Iago Toral Quiroga <itoral src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] [youtube] Ensure we always set the media id.
- Date: Wed, 7 Apr 2010 14:28:18 +0000 (UTC)
commit 314c2e2015d975301140e332b65b5e8e354daf99
Author: Iago Toral Quiroga <itoral igalia com>
Date: Wed Apr 7 16:27:40 2010 +0200
[youtube] Ensure we always set the media id.
src/youtube/grl-youtube.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/youtube/grl-youtube.c b/src/youtube/grl-youtube.c
index b88f6a6..b8f27f0 100644
--- a/src/youtube/grl-youtube.c
+++ b/src/youtube/grl-youtube.c
@@ -454,13 +454,15 @@ build_media_from_entry (GrlMedia *content,
media = content;
}
+ /* Make sure we set the media id in any case */
+ if (!grl_media_get_id (media)) {
+ grl_media_set_id (media, entry->id);
+ }
+
iter = (GList *) keys;
while (iter) {
GrlKeyID key_id = POINTER_TO_GRLKEYID (iter->data);
switch (key_id) {
- case GRL_METADATA_KEY_ID:
- grl_media_set_id (media, entry->id);
- break;
case GRL_METADATA_KEY_TITLE:
grl_media_set_title (media, entry->title);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]