[rygel] media-export: Simplify format string



commit 072374c30d7e965378d7772db11d7f53d3f253d5
Author: Jens Georg <mail jensge org>
Date:   Sat Aug 14 17:17:25 2010 +0300

    media-export: Simplify format string

 .../rygel-media-export-media-cache.vala            |    2 +-
 .../rygel-media-export-sql-factory.vala            |    4 ++--
 2 files changed, 3 insertions(+), 3 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 5b67a8f..347ffb1 100644
--- a/src/plugins/media-export/rygel-media-export-media-cache.vala
+++ b/src/plugins/media-export/rygel-media-export-media-cache.vala
@@ -753,7 +753,7 @@ public class Rygel.MediaExport.MediaCache : Object {
         };
 
         var sql = this.sql.make (SQLString.GET_META_DATA_COLUMN);
-        this.db.exec (sql.printf (column, column, filter, column),
+        this.db.exec (sql.printf (column, filter),
                       args.values,
                       callback);
 
diff --git a/src/plugins/media-export/rygel-media-export-sql-factory.vala b/src/plugins/media-export/rygel-media-export-sql-factory.vala
index 444b0fe..b5b8789 100644
--- a/src/plugins/media-export/rygel-media-export-sql-factory.vala
+++ b/src/plugins/media-export/rygel-media-export-sql-factory.vala
@@ -151,8 +151,8 @@ internal class Rygel.MediaExport.SQLFactory : Object {
     "SELECT upnp_id FROM OBJECT WHERE parent = ?";
 
     private const string GET_META_DATA_COLUMN_STRING =
-    "SELECT DISTINCT %s FROM meta_data AS m " +
-        "WHERE %s IS NOT NULL %s ORDER BY %s LIMIT ?,?";
+    "SELECT DISTINCT %s AS _column FROM meta_data AS m " +
+        "WHERE _column IS NOT NULL %s ORDER BY _column LIMIT ?,?";
 
     internal const string schema_version = "10";
     internal const string CREATE_META_DATA_TABLE_STRING =



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