GNOME Bugzilla – Bug 706412
filesystem plugin filters all on GRL_FILTER_TYPE_NONE (patch)
Last modified: 2013-09-08 11:41:29 UTC
When filter type is set no none, directories are returned but no files.
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).
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.
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(-)
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.
Reopening due comment #4
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.