[rygel] media-export: Do not try to re-add container to db
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Do not try to re-add container to db
- Date: Mon, 21 Sep 2009 11:54:53 +0000 (UTC)
commit 7696dbdb6c0fd7a0da221ec504382ee1fb79969a
Author: Jens Georg <mail jensge org>
Date: Thu Sep 17 12:44:59 2009 +0200
media-export: Do not try to re-add container to db
.../media-export/rygel-media-export-harvester.vala | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-harvester.vala b/src/plugins/media-export/rygel-media-export-harvester.vala
index 985c829..8d98685 100644
--- a/src/plugins/media-export/rygel-media-export-harvester.vala
+++ b/src/plugins/media-export/rygel-media-export-harvester.vala
@@ -218,10 +218,14 @@ public class Rygel.MediaExportHarvester : GLib.Object {
if (info.get_file_type () == FileType.DIRECTORY) {
this.origin = file;
monitor.monitor (file);
- this.containers.push_tail (new DummyContainer (file,
- this.parent));
+ var container = new DummyContainer (file, this.parent);
+ this.containers.push_tail (container);
+
+ int64 timestamp;
+ if (!this.media_db.exists (container.id, out timestamp)) {
+ this.media_db.save_object (container);
+ }
- this.media_db.save_object (this.containers.peek_tail ());
Idle.add (this.on_idle);
} else {
string id;
@@ -233,7 +237,9 @@ public class Rygel.MediaExportHarvester : GLib.Object {
}
} catch (Error err) {
- warning ("Failed to harvest file %s", file.get_uri ());
+ warning ("Failed to harvest file %s: %s",
+ file.get_uri (),
+ err.message);
harvested (file);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]