After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 690360 - Cannot search for "object.container" object type
Cannot search for "object.container" object type
Status: RESOLVED FIXED
Product: rygel
Classification: Applications
Component: MediaExport plugin
0.17.x
Other Linux
: Normal normal
: ---
Assigned To: Jens Georg
rygel-maint
Depends on:
Blocks:
 
 
Reported: 2012-12-17 16:10 UTC by regis.merlino
Modified: 2013-01-18 16:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Workaround patch (1.51 KB, patch)
2012-12-17 16:11 UTC, regis.merlino
none Details | Review
Workaround patch - v2 (1.54 KB, patch)
2012-12-17 16:40 UTC, regis.merlino
needs-work Details | Review
Workaround patch - v3 (2.50 KB, patch)
2012-12-18 08:38 UTC, regis.merlino
committed Details | Review

Description regis.merlino 2012-12-17 16:10:59 UTC
The request "upnp:class derivedfrom object.container" always return an empty list.

I attached a simple workaround patch for this issue, but there must be a cleaner way to solve it I guess.
Comment 1 regis.merlino 2012-12-17 16:11:54 UTC
Created attachment 231737 [details] [review]
Workaround patch
Comment 2 regis.merlino 2012-12-17 16:40:30 UTC
Created attachment 231740 [details] [review]
Workaround patch - v2

Fix a runtime issue.
Comment 3 Jens Georg 2012-12-17 22:37:53 UTC
Oh, I suppose that's one half of bug 676399
Comment 4 Jens Georg 2012-12-17 22:45:29 UTC
Review of attachment 231740 [details] [review]:

Apart from the minor style stuff - well spotted, thank you.

::: src/plugins/media-export/rygel-media-export-media-cache.vala
@@ +937,3 @@
             case SearchCriteriaOp.DERIVED_FROM:
+                if (column == "m.class" &&
+                    exp.operand2.has_prefix("object.container")) {

missing space between has_prefix and (

@@ +940,3 @@
+                    int type = ObjectType.CONTAINER;
+                    operator = new SqlOperator ("=", "o.type_fk");
+                    v = type;

You can just assign v Object.CONTAINER
Comment 5 Jens Georg 2012-12-18 00:34:27 UTC
Review of attachment 231740 [details] [review]:

::: src/plugins/media-export/rygel-media-export-media-cache.vala
@@ +940,3 @@
+                    int type = ObjectType.CONTAINER;
+                    operator = new SqlOperator ("=", "o.type_fk");
+                    v = type;

Ah, right, you can't. but casting to (int) should do.
Comment 6 regis.merlino 2012-12-18 08:38:19 UTC
Created attachment 231786 [details] [review]
Workaround patch - v3

Jens, I replaced the temporary variable with a cast and added the "equal" operator case that should also be supported.
Comment 7 Jens Georg 2013-01-18 16:42:24 UTC
Comment on attachment 231786 [details] [review]
Workaround patch - v3

Pushed