[grilo-plugins] lua-factory: Add "none" resolve_keys type



commit 5e11fca61d969fe0460207a0a662afacecf84d88
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Apr 4 17:42:45 2016 +0200

    lua-factory: Add "none" resolve_keys type
    
    Lua sources should be able to specify that they do not support any of
    the base types that grilo uses.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=764602

 src/lua-factory/grl-lua-factory.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/lua-factory/grl-lua-factory.c b/src/lua-factory/grl-lua-factory.c
index 1f1913b..d83ba7a 100644
--- a/src/lua-factory/grl-lua-factory.c
+++ b/src/lua-factory/grl-lua-factory.c
@@ -1407,11 +1407,11 @@ lua_plugin_source_all_keys (lua_State *L,
         supported_media = GRL_SUPPORTED_MEDIA_IMAGE;
       else if (g_strcmp0 (key_name, "all") == 0)
         supported_media = GRL_SUPPORTED_MEDIA_ALL;
-
-      if (supported_media == GRL_SUPPORTED_MEDIA_NONE) {
+      else if (g_strcmp0 (key_name, "none") == 0)
+        supported_media = GRL_SUPPORTED_MEDIA_NONE;
+      else
         GRL_WARNING ("(%s) value '%s' is not supported on %s.type ",
                      source_id, key_name, LUA_SOURCE_RESOLVE_KEYS);
-      }
     } else {
       GRL_WARNING ("(%s) expecting string on %s.type but got instead %s", source_id,
                    LUA_SOURCE_RESOLVE_KEYS, lua_typename (L, lua_type (L, -1)));


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