[rygel] media-export: Hook up virtual folders to root folder
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Hook up virtual folders to root folder
- Date: Mon, 22 Mar 2010 17:07:21 +0000 (UTC)
commit 6e5d0ef7d1ab2afeca2358e1b56eb758b67e90d1
Author: Jens Georg <mail jensge org>
Date: Mon Feb 8 15:01:13 2010 +0100
media-export: Hook up virtual folders to root folder
.../rygel-media-export-root-container.vala | 25 ++++++++++++++++++++
1 files changed, 25 insertions(+), 0 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 ee88d51..3d7ef9b 100644
--- a/src/plugins/media-export/rygel-media-export-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-root-container.vala
@@ -281,6 +281,31 @@ public class Rygel.MediaExportRootContainer : Rygel.MediaDBContainer {
}
}
+ try {
+ var config = MetaConfig.get_default ();
+ var virtual_containers = config.get_string_list (
+ "MediaExport",
+ "virtual-folders");
+ foreach (var container in virtual_containers) {
+ var info = container.split ("=");
+ var id = MediaExportQueryContainer.PREFIX + info[1];
+ var virtual_container = new MediaExportQueryContainer (
+ this.media_db,
+ id,
+ info[0]);
+ virtual_container.parent = this;
+ try {
+ this.media_db.save_container (virtual_container);
+ ids.remove (id);
+ } catch (Error db_err) {
+ // do nothing
+ }
+ }
+ } catch (Error error) {
+ warning ("Got error while trying to find virtual folders: %s",
+ error.message);
+ }
+
foreach (var id in ids) {
if (id == MediaExportDynamicContainer.ID)
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]