[rygel] mediathek: Add description from RSS feed
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] mediathek: Add description from RSS feed
- Date: Fri, 17 Aug 2012 22:12:52 +0000 (UTC)
commit 8977dbabb5e78e97aacf39f6590ce72fc339844b
Author: Jens Georg <mail jensge org>
Date: Sat Aug 18 00:10:55 2012 +0200
mediathek: Add description from RSS feed
.../rygel-mediathek-video-item-factory.vala | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/src/plugins/mediathek/rygel-mediathek-video-item-factory.vala b/src/plugins/mediathek/rygel-mediathek-video-item-factory.vala
index bae9432..d5aeea4 100644
--- a/src/plugins/mediathek/rygel-mediathek-video-item-factory.vala
+++ b/src/plugins/mediathek/rygel-mediathek-video-item-factory.vala
@@ -43,14 +43,13 @@ internal class Rygel.Mediathek.VideoItemFactory : Object {
public async VideoItem? create (MediaContainer parent,
Xml.Node *xml_item)
throws VideoItemError {
- string title;
- string playlist_url;
- string date;
+ string title, playlist_url, date, description = null;
this.extract_data_from_xml (xml_item,
out title,
out playlist_url,
- out date);
+ out date,
+ out description);
var resolved_uris = yield playlist_parser.parse (playlist_url);
@@ -64,6 +63,7 @@ internal class Rygel.Mediathek.VideoItemFactory : Object {
item.mime_type = this.playlist_parser.mime_type;
item.author = "ZDF - Second German TV Channel Streams";
item.date = date;
+ item.description = description;
if (this.video_format == VIDEO_FORMAT_WMV) {
item.dlna_profile = "WMVMED_FULL";
@@ -112,7 +112,8 @@ internal class Rygel.Mediathek.VideoItemFactory : Object {
private void extract_data_from_xml (Xml.Node *item,
out string title,
out string playlist_url,
- out string? date)
+ out string? date,
+ out string? description)
throws VideoItemError {
var title_node = XMLUtils.get_element (item, "title");
var group = XMLUtils.get_element (item, "group");
@@ -164,5 +165,12 @@ internal class Rygel.Mediathek.VideoItemFactory : Object {
} else {
date = null;
}
+
+ var desc_node = XMLUtils.get_element (item, "description");
+ if (desc_node != null) {
+ description = desc_node->get_content ();
+ } else {
+ description = null;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]