[rygel] media-export: Root container should handle items
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel] media-export: Root container should handle items
- Date: Fri, 5 Jun 2009 12:02:44 -0400 (EDT)
commit d1b669067832be27b226a575ba1df73a5fce5ba3
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Jun 4 20:12:36 2009 +0300
media-export: Root container should handle items
---
.../rygel-media-export-root-container.vala | 21 +++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/src/plugins/media-export/rygel-media-export-root-container.vala b/src/plugins/media-export/rygel-media-export-root-container.vala
index 705f6be..6f21f6e 100644
--- a/src/plugins/media-export/rygel-media-export-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-root-container.vala
@@ -116,7 +116,26 @@ public class Rygel.MediaExportRootContainer : MediaContainer {
foreach (var uri in uris) {
var f = File.new_for_commandline_arg (uri);
if (f.query_exists (null)) {
- this.children.add (new MediaExportContainer (this, f));
+ MediaObject media_obj = null;
+ var info = f.query_info (
+ FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE + "," +
+ FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME + "," +
+ FILE_ATTRIBUTE_STANDARD_TYPE + "," +
+ FILE_ATTRIBUTE_STANDARD_NAME,
+ FileQueryInfoFlags.NONE,
+ null);
+
+ if (info.get_file_type () == FileType.DIRECTORY) {
+ media_obj = new MediaExportContainer (this, f);
+ } else {
+ media_obj = new MediaExportItem (this,
+ f,
+ info);
+ }
+
+ if (media_obj != null) {
+ this.children.add (media_obj);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]