GNOME Bugzilla – Bug 690360
Cannot search for "object.container" object type
Last modified: 2013-01-18 16:42:38 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.
Created attachment 231737 [details] [review] Workaround patch
Created attachment 231740 [details] [review] Workaround patch - v2 Fix a runtime issue.
Oh, I suppose that's one half of bug 676399
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
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.
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 on attachment 231786 [details] [review] Workaround patch - v3 Pushed