media-export: small refactor
authorJens Georg <mail@jensge.org>
Fri, 16 Oct 2009 18:36:38 +0000 (20:36 +0200)
committerJens Georg <mail@jensge.org>
Fri, 16 Oct 2009 18:53:45 +0000 (20:53 +0200)
Idle.add is always used in conjunction with do_update, so just move it inside

src/plugins/media-export/rygel-media-export-harvester.vala

index b0e5685..c083b30 100644 (file)
@@ -167,7 +167,6 @@ public class Rygel.MediaExportHarvester : GLib.Object {
 
         cleanup_database (this.containers.peek_head() as DummyContainer);
         this.do_update ();
-        Idle.add(this.on_idle);
     }
 
     void cleanup_database (DummyContainer container) {
@@ -292,7 +291,6 @@ public class Rygel.MediaExportHarvester : GLib.Object {
 
             this.files.pop_head ();
             this.do_update ();
-            Idle.add(this.on_idle);
         }
     }
 
@@ -306,7 +304,6 @@ public class Rygel.MediaExportHarvester : GLib.Object {
         if (file == entry.file) {
             this.files.pop_head ();
             this.do_update ();
-            Idle.add(this.on_idle);
         }
     }
 
@@ -316,5 +313,6 @@ public class Rygel.MediaExportHarvester : GLib.Object {
             this.containers.peek_head ().updated ();
             this.containers.pop_head ();
         }
+        Idle.add(this.on_idle);
     }
 }