#define CONFIG_TEXT N_("Lua interface configuration")
#define CONFIG_LONGTEXT N_("Lua interface configuration string. Format is: '[\"<interface module name>\"] = { <option> = <value>, ...}, ...'.")
-#define HOST_TEXT N_( "Host address" )
-#define HOST_LONGTEXT N_( \
- "Address and port the HTTP interface will listen on. It defaults to " \
- "all network interfaces (0.0.0.0)." \
- " If you want the HTTP interface to be available only on the local " \
- "machine, enter 127.0.0.1" )
#define SRC_TEXT N_( "Source directory" )
#define SRC_LONGTEXT N_( "Source directory" )
#define INDEX_TEXT N_( "Directory index" )
add_submodule ()
set_section( N_("Lua HTTP"), 0 )
- add_string ( "http-host", NULL, HOST_TEXT, HOST_LONGTEXT, true )
add_string ( "http-src", NULL, SRC_TEXT, SRC_LONGTEXT, true )
add_bool ( "http-index", false, INDEX_TEXT, INDEX_LONGTEXT, true )
set_capability( "interface", 0 )
i++;
free( datadir );
-#if !(defined(__APPLE__) || defined(WIN32))
+#if !(defined(__APPLE__) || defined(WIN32) || defined(__OS2__))
if( likely(asprintf( &ppsz_dir_list[i], "%s"DIR_SEP"lua"DIR_SEP"%s",
config_GetLibDir(), luadirname ) != -1) )
i++;
* Meta data setters utility.
* Playlist item table should be on top of the stack when these are called
*****************************************************************************/
-void __vlclua_read_meta_data( vlc_object_t *p_this, lua_State *L,
- input_item_t *p_input )
+#undef vlclua_read_meta_data
+void vlclua_read_meta_data( vlc_object_t *p_this, lua_State *L,
+ input_item_t *p_input )
{
#define TRY_META( a, b ) \
lua_getfield( L, -1, a ); \
TRY_META( "trackid", TrackID );
}
-void __vlclua_read_custom_meta_data( vlc_object_t *p_this, lua_State *L,
+#undef vlclua_read_custom_meta_data
+void vlclua_read_custom_meta_data( vlc_object_t *p_this, lua_State *L,
input_item_t *p_input )
{
/* Lock the input item and create the meta table if needed */
/**
* Playlist item table should be on top of the stack when this is called
*/
-void __vlclua_read_options( vlc_object_t *p_this, lua_State *L,
+#undef vlclua_read_options
+void vlclua_read_options( vlc_object_t *p_this, lua_State *L,
int *pi_options, char ***pppsz_options )
{
lua_getfield( L, -1, "options" );
lua_pop( L, 1 ); /* pop "options" */
}
-int __vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
+#undef vlclua_playlist_add_internal
+int vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
playlist_t *p_playlist,
input_item_t *p_parent, bool b_play )
{
if( lua_isstring( L, -1 ) )
{
const char *psz_path = NULL;
+ char *psz_u8path = NULL;
const char *psz_name = NULL;
char **ppsz_options = NULL;
int i_options = 0;
{
if( !lua_isnil( L, -1 ) )
msg_Warn( p_this, "Playlist item name should be a string." );
- psz_name = psz_path;
+ psz_name = NULL;
}
/* Read duration */
vlclua_read_options( p_this, L, &i_options, &ppsz_options );
/* Create input item */
- p_input = input_item_NewExt( p_playlist, psz_path,
- psz_name, i_options,
+ p_input = input_item_NewExt( psz_path, psz_name, i_options,
(const char **)ppsz_options,
VLC_INPUT_OPTION_TRUSTED,
i_duration );
while( i_options > 0 )
free( ppsz_options[--i_options] );
free( ppsz_options );
+ free( psz_u8path );
}
else
{
return count;
}
-int __vlclua_add_modules_path( vlc_object_t *obj, lua_State *L, const char *psz_filename )
+#undef vlclua_add_modules_path
+int vlclua_add_modules_path( vlc_object_t *obj, lua_State *L, const char *psz_filename )
{
/* Setup the module search path:
* * "The script's directory"/modules