[totem/wip/carlosg/grilo-range-query: 11/11] grilo: Specify upper boundary for duration range filter




commit fa537391bf40712e57199c6bfca3a62cb28ea04a
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Jun 14 20:48:45 2020 +0200

    grilo: Specify upper boundary for duration range filter
    
    Handle https://gitlab.gnome.org/GNOME/grilo/-/issues/140 locally
    and specify an upper range that does not translate to 0. This
    will be necessary for the tracker3 grilo source, as it doesn't
    try to interpret what that 0 means.

 src/totem-grilo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/totem-grilo.c b/src/totem-grilo.c
index a7f06b60c..7a63bad59 100644
--- a/src/totem-grilo.c
+++ b/src/totem-grilo.c
@@ -53,6 +53,7 @@
 #define PAGE_SIZE             50
 #define SCROLL_GET_MORE_LIMIT 0.8
 #define MIN_DURATION          5
+#define MAX_DURATION          G_MAXINT
 
 /* casts are to shut gcc up */
 static const GtkTargetEntry target_table[] = {
@@ -752,7 +753,7 @@ browse (TotemGrilo   *self,
                grl_operation_options_set_type_filter (default_options, GRL_TYPE_FILTER_VIDEO);
        if (grl_caps_is_key_range_filter (caps, GRL_METADATA_KEY_DURATION))
                grl_operation_options_set_key_range_filter (default_options,
-                                                           GRL_METADATA_KEY_DURATION, MIN_DURATION, NULL,
+                                                           GRL_METADATA_KEY_DURATION, MIN_DURATION, 
MAX_DURATION,
                                                            NULL);
 
        bud = g_slice_new0 (BrowseUserData);


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