[rygel] media-export: Fix UPnP "exists" search



commit d88825464d530355fd2391866f181c6bdfef0d0a
Author: Jens Georg <mail jensge org>
Date:   Wed Aug 25 21:15:45 2010 +0300

    media-export: Fix UPnP "exists" search

 .../rygel-media-export-media-cache.vala            |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-media-cache.vala b/src/plugins/media-export/rygel-media-export-media-cache.vala
index b1aec0f..688f749 100644
--- a/src/plugins/media-export/rygel-media-export-media-cache.vala
+++ b/src/plugins/media-export/rygel-media-export-media-cache.vala
@@ -738,12 +738,12 @@ public class Rygel.MediaExport.MediaCache : Object {
             case SearchCriteriaOp.EXISTS:
                 string sql_function;
                 if (exp.operand2 == "true") {
-                    sql_function = "IS NOT NULL AND %s != ''";
+                    sql_function = "%s IS NOT NULL AND %s != ''";
                 } else {
-                    sql_function = "IS NULL OR %s = ''";
+                    sql_function = "%s IS NULL OR %s = ''";
                 }
-                operator = new SqlOperator (sql_function, column);
-                break;
+
+                return sql_function.printf (column, column);
             case SearchCriteriaOp.EQ:
             case SearchCriteriaOp.NEQ:
             case SearchCriteriaOp.LESS:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]