[rygel] core: Fix join in query and giving child correct id
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel] core: Fix join in query and giving child correct id
- Date: Thu, 25 Jun 2009 15:46:40 +0000 (UTC)
commit 3c49cf8b538fca6389b74dab10e1d9bb44736a8d
Author: Jens Georg <mail jensge org>
Date: Sun Jun 21 02:03:00 2009 +0200
core: Fix join in query and giving child correct id
src/rygel/rygel-media-db.vala | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/rygel/rygel-media-db.vala b/src/rygel/rygel-media-db.vala
index 352bf57..6b28942 100644
--- a/src/rygel/rygel-media-db.vala
+++ b/src/rygel/rygel-media-db.vala
@@ -100,10 +100,14 @@ public class Rygel.MediaDB : Object {
"ON Object.metadata_fk = Meta_Data.id WHERE Object.upnp_id = ?";
private const string CHILDREN_GET_STRING =
- "SELECT Object.type_fk, Object.title, size, mime_type, width, height, " +
- "class, author, album, date, bitrate, sample_freq, " +
- "bits_per_sample, channels, track, color_depth, duration " +
- "FROM Meta_Data LEFT OUTER JOIN Object " +
+ "SELECT type_fk, title, Meta_Data.size, Meta_Data.mime_type, " +
+ "Meta_Data.width, Meta_Data.height, " +
+ "Meta_Data.class, Meta_Data.author, Meta_Data.album, " +
+ "Meta_Data.date, Meta_Data.bitrate, Meta_Data.sample_freq, " +
+ "Meta_Data.bits_per_sample, Meta_Data.channels, " +
+ "Meta_Data.track, Meta_Data.color_depth, Meta_Data.duration, " +
+ "upnp_id " +
+ "FROM Object LEFT OUTER JOIN Meta_Data " +
"ON Object.metadata_fk = Meta_Data.id " +
"WHERE Object.parent = ? " +
"LIMIT ?,?";
@@ -443,7 +447,8 @@ public class Rygel.MediaDB : Object {
children = new Gee.ArrayList<MediaObject> ();
}
- children.add (get_object_from_statement (object_id, statement));
+ var child_id = statement.column_text (17);
+ children.add (get_object_from_statement (child_id, statement));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]