[rygel] core: Support for 'place holder' items
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Support for 'place holder' items
- Date: Wed, 17 Feb 2010 13:40:14 +0000 (UTC)
commit c684b6ac4572187e01ba0742c5a3fe0e7194cc93
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Jan 26 17:03:15 2010 +0200
core: Support for 'place holder' items
Items could be marked as 'place holder'. It means items that do not yet
have any media (empty) available for them.
src/rygel/rygel-didl-lite-writer.vala | 15 ++++++++++-----
src/rygel/rygel-media-item.vala | 2 ++
2 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/src/rygel/rygel-didl-lite-writer.vala b/src/rygel/rygel-didl-lite-writer.vala
index 3f3c949..7e5e7dc 100644
--- a/src/rygel/rygel-didl-lite-writer.vala
+++ b/src/rygel/rygel-didl-lite-writer.vala
@@ -85,13 +85,18 @@ internal class Rygel.DIDLLiteWriter : GUPnP.DIDLLiteWriter {
didl_item.date = item.date;
}
- // Add the transcoded/proxy URIs first
- this.http_server.add_resources (didl_item, item);
+ if (item.place_holder) {
+ this.http_server.add_proxy_resource (didl_item, item);
+ } else {
+ // Add the transcoded/proxy URIs first
+ this.http_server.add_resources (didl_item, item);
- var internal_allowed = this.http_server.context.interface == "lo" ||
+ // then original URIs
+ bool internal_allowed;
+ internal_allowed = this.http_server.context.interface == "lo" ||
this.http_server.context.host_ip == "127.0.0.1";
- // then original URIs
- item.add_resources (didl_item, internal_allowed);
+ item.add_resources (didl_item, internal_allowed);
+ }
}
private void serialize_container (MediaContainer container) throws Error {
diff --git a/src/rygel/rygel-media-item.vala b/src/rygel/rygel-media-item.vala
index 337eb9f..0f10a6d 100644
--- a/src/rygel/rygel-media-item.vala
+++ b/src/rygel/rygel-media-item.vala
@@ -64,6 +64,8 @@ public class Rygel.MediaItem : MediaObject {
public ArrayList<Thumbnail> thumbnails;
+ internal bool place_holder = false;
+
public MediaItem (string id,
MediaContainer parent,
string title,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]