[rygel] media-export: Use specific functions to check whether container is empty or not.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Use specific functions to check whether container is empty or not.
- Date: Wed, 30 Jan 2013 11:15:48 +0000 (UTC)
commit 1030716bd032e22a730c406df82a3634a67270f5
Author: Krzesimir Nowak <krnowak openismus com>
Date: Wed Jan 30 12:07:26 2013 +0100
media-export: Use specific functions to check whether container is empty or not.
.../rygel-media-export-harvesting-task.vala | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-harvesting-task.vala b/src/plugins/media-export/rygel-media-export-harvesting-task.vala
index fe37c27..982788b 100644
--- a/src/plugins/media-export/rygel-media-export-harvesting-task.vala
+++ b/src/plugins/media-export/rygel-media-export-harvesting-task.vala
@@ -275,12 +275,12 @@ public class Rygel.MediaExport.HarvestingTask : Rygel.StateMachine,
return false;
}
- if (this.files.size > 0) {
+ if (!this.files.is_empty) {
debug ("Scheduling file %s for meta-data extractionâ",
this.files.peek ().file.get_uri ());
this.extractor.extract (this.files.peek ().file,
this.files.peek ().content_type);
- } else if (this.containers.get_length () > 0) {
+ } else if (!this.containers.is_empty ()) {
this.enumerate_directory.begin ();
} else {
// nothing to do
@@ -372,8 +372,8 @@ public class Rygel.MediaExport.HarvestingTask : Rygel.StateMachine,
* Reschedule the iteration and extraction
*/
private void do_update () {
- if (this.files.size == 0 &&
- this.containers.get_length () != 0) {
+ if (this.files.is_empty &&
+ !this.containers.is_empty ()) {
var container = this.containers.peek_head ();
try {
var cache = MediaCache.get_default ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]