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 706412 - filesystem plugin filters all on GRL_FILTER_TYPE_NONE (patch)
filesystem plugin filters all on GRL_FILTER_TYPE_NONE (patch)
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
unspecified
Other Linux
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2013-08-20 15:28 UTC by Martin Franco
Modified: 2013-09-08 11:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
doc: Fix documentation about GRL_TYPE_FILTER_NONE (1.82 KB, patch)
2013-08-20 22:09 UTC, Juan A. Suarez Romero
committed Details | Review
Filesystem plugin should return all files on GRL_TYPE_FILTER_ALL (754 bytes, patch)
2013-08-20 22:47 UTC, Martin Franco
rejected Details | Review

Description Martin Franco 2013-08-20 15:28:56 UTC
When filter type is set no none, directories are returned but no files.
Comment 1 Juan A. Suarez Romero 2013-08-20 22:02:14 UTC
I think the problem is more in the documentation than in the code.

GRL_TYPE_FILTER_foo allows content of type "foo". Thus, GRL_TYPE_FILTER_AUDIO allows content of type audio, while GRL_TYPE_FILTER_VIDEO allows content of type video.

Following above approach, GRL_TYPE_FILTER_ALL would allow content of any type (allow "all"), while GRL_TYPE_FILTER_NONE allow no content (only folders).
Comment 2 Juan A. Suarez Romero 2013-08-20 22:09:14 UTC
Created attachment 252478 [details] [review]
doc: Fix documentation about GRL_TYPE_FILTER_NONE

GRL_TYPE_FILTER_NONE means "do not allow any content" (only
GrlMediaBox), while GRL_TYPE_FILTER_ALL means "allow all content".

This commit clarifies it.
Comment 3 Juan A. Suarez Romero 2013-08-20 22:10:05 UTC
commit 5b88159eaa8d06a5f17c092cbb69b79e62d48f2b
Author: Juan A. Suarez Romero <jasuarez@igalia.com>
Date:   Wed Aug 21 00:07:36 2013 +0200

    doc: Fix documentation about GRL_TYPE_FILTER_NONE
    
    GRL_TYPE_FILTER_NONE means "do not allow any content" (only
    GrlMediaBox), while GRL_TYPE_FILTER_ALL means "allow all content".
    
    This commit clarifies it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706412

 src/grl-caps.c | 4 ++--
 src/grl-caps.h | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
Comment 4 Martin Franco 2013-08-20 22:47:57 UTC
Created attachment 252485 [details] [review]
Filesystem plugin should return all files on GRL_TYPE_FILTER_ALL

GRL_TYPE_FILTER_ALL filters out anything that isn't recognized as music, photo, or video, at least with the current filesystem plugin.  Attached patch makes it return all files.
Comment 5 Juan A. Suarez Romero 2013-08-26 06:51:35 UTC
Reopening due comment #4
Comment 6 Juan A. Suarez Romero 2013-09-08 11:41:07 UTC
Seems I made a mistake with comment #4.

Grilo only deals with multimedia content; so any content that is not a multimedia file (audio, video or image) is always discarded, no matter what the filter says.

So you must read GRL_TYPE_FILTER_ALL as "allow all *multimedia* content".

Apologies for the misreading.