GNOME Bugzilla – Bug 758654
Fix tracker serialisation
Last modified: 2015-12-16 09:43:03 UTC
.
Created attachment 316234 [details] [review] tracker: Add IDs to top-level tracker boxes
Created attachment 316235 [details] [review] tracker: Map container ID to tracker categories Combined with the previous commit, this allows: grl-launch-0.3 -S browse -k title grlbox://grl-tracker-source/videos to actually work. Otherwise the category would be none, and we'd always print the top-level categories.
Created attachment 316238 [details] [review] source: Warn against broken media boxes All media boxes should have IDs for us to be able to serialise, or deserialise it, and, for example, browse the sub-boxes in some sources with grl-launch.
Review of attachment 316235 [details] [review]: ::: src/tracker/grl-tracker-source-api.c @@ +1059,3 @@ + category = "nmm:Video"; + else { + /* Error out */ No need to set GError? GRL_WARNING to help debugging
Review of attachment 316234 [details] [review]: looks good
Review of attachment 316238 [details] [review]: Looks good
(In reply to Victor Toso from comment #4) > Review of attachment 316235 [details] [review] [review]: > > ::: src/tracker/grl-tracker-source-api.c > @@ +1059,3 @@ > + category = "nmm:Video"; > + else { > + /* Error out */ > > No need to set GError? > > GRL_WARNING to help debugging Probably should, yes. But that patch also breaks navigation at the top-level of the source when using grilo-test-ui.
Review of attachment 316235 [details] [review]: This breaks when browsing in grilo-test-ui because it *does* pass a container with a NULL ID, which is what we're trying to detect. Complicated...
3765 if (!container) {• 3766 /* Special case: NULL container ==> NULL id */• 3767 bs->container = grl_media_box_new ();• 3768 grl_media_set_source (bs->container,• 3769 grl_source_get_id (source));• Sad trombon.
Created attachment 316609 [details] [review] core: Remove trailing '/' from GrlMedia IDs grl-launch-0.3 -S browse -k title grlbox://grl-tracker-source/videos/ should have the same output as: grl-launch-0.3 -S browse -k title grlbox://grl-tracker-source/videos The first would get its ID parsed to "videos/" whereas the second would be parsed to "videos". Chomp the trailing '/'.
Created attachment 316611 [details] [review] tracker: Map container ID to tracker categories Combined with the previous commit, this allows: grl-launch-0.3 -S browse -k title grlbox://grl-tracker-source/videos to actually work. Otherwise the category would be none, and we'd always print the top-level categories.
Review of attachment 316609 [details] [review]: LGTM
Created attachment 317335 [details] [review] tracker: ensure ID is always obtained GRL_METADATA_KEY_ID is almost a mandatory key, and thus must be obtained even if user doesn't request it.
Review of attachment 316611 [details] [review]: +1
Attachment 316238 [details] pushed as 0b7ed08 - source: Warn against broken media boxes Attachment 316609 [details] pushed as 6d68858 - core: Remove trailing '/' from GrlMedia IDs
Attachment 316234 [details] pushed as 5a2cf05 - tracker: Add IDs to top-level tracker boxes Attachment 316611 [details] pushed as eaef66e - tracker: Map container ID to tracker categories Attachment 317335 [details] pushed as c74848f - tracker: ensure ID is always obtained
Created attachment 317486 [details] [review] doc: update documentation No more GrlMediaFoos. https://bugzilla.gnome.org/show_bug.cgi?id=755551
Review of attachment 317486 [details] [review]: Wrong patch added.