Commit 05b625bc authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

lua: Add freebox and frenchtv back in the builtin SD.

You can now load them with --services-discovery=freebox,frenchtv.
However non registered lua sd will still require --lua-sd=<name>.
parent e1bdce67
......@@ -57,10 +57,22 @@ int Open_LuaSD( vlc_object_t *p_this )
services_discovery_t *p_sd = ( services_discovery_t * )p_this;
services_discovery_sys_t *p_sys;
lua_State *L;
char *psz_name = NULL;
char *psz_name = strdup(p_sd->psz_name);
if( !strcmp(p_sd->psz_name, "lua"))
{
// We want to load the module name "lua"
// This module can be used to load lua script not registered
// as builtin lua SD modules.
config_ChainParse( p_sd, "lua-", ppsz_sd_options, p_sd->p_cfg );
psz_name = var_CreateGetString( p_sd, "lua-sd" );
}
else
{
// We are loading a builtin lua sd module.
psz_name = strdup(p_sd->psz_name);
}
config_ChainParse( p_sd, "lua-", ppsz_sd_options, p_sd->p_cfg );
psz_name = var_CreateGetString( p_sd, "lua-sd" );
if( !( p_sys = malloc( sizeof( services_discovery_sys_t ) ) ) )
return VLC_ENOMEM;
p_sd->p_sys = p_sys;
......
......@@ -124,6 +124,18 @@ vlc_module_begin ()
add_string( "lua-sd", "", NULL, "", "", false )
set_callbacks( Open_LuaSD, Close_LuaSD )
add_submodule ()
set_description( N_("Freebox TV") )
add_shortcut( "freebox" )
set_capability( "services_discovery", 0 )
set_callbacks( Open_LuaSD, Close_LuaSD )
add_submodule ()
set_description( N_("French TV") )
add_shortcut( "frenchtv" )
set_capability( "services_discovery", 0 )
set_callbacks( Open_LuaSD, Close_LuaSD )
VLC_SD_PROBE_SUBMODULE
vlc_module_end ()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment