[rygel] media-export: Move some code into a helper.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Move some code into a helper.
- Date: Fri, 18 Jan 2013 10:30:08 +0000 (UTC)
commit 7ac6fbb25af2d99a33f2faefbb7a410c0f7483ad
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Jan 18 11:20:53 2013 +0100
media-export: Move some code into a helper.
.../rygel-media-export-root-container.vala | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 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 2cbe581..398a3c8 100644
--- a/src/plugins/media-export/rygel-media-export-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-root-container.vala
@@ -433,9 +433,16 @@ public class Rygel.MediaExport.RootContainer : TrackableDbContainer {
}
}
- // Signal that the container has been updated with new/changed content.
+ root_updated ();
+ }
+
+ // Signal that the container has been updated with new/changed content.
+ private void root_updated () {
+
this.updated ();
+ // Persist the container_update_id value that was generated by
+ // the call to updated ().
try {
this.media_db.save_container (this);
} catch (Error error) { }
@@ -452,17 +459,11 @@ public class Rygel.MediaExport.RootContainer : TrackableDbContainer {
// also add the virtual folders:
this.add_default_virtual_folders ();
- this.updated ();
- try {
- this.media_db.save_container (this);
- } catch (Error error) { }
+ root_updated ();
this.filesystem_container.container_updated.connect( () => {
this.add_default_virtual_folders ();
- this.updated ();
- try {
- this.media_db.save_container (this);
- } catch (Error error) { }
+ root_updated ();
});
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]