vlc_object_t *p_this = vlclua_get_this( L );
/* The rc.c code also stops the playlist ... not sure if this is needed
* though. */
- vlc_object_kill( p_this->p_libvlc );
+ libvlc_Quit( p_this->p_libvlc );
return 0;
}
*****************************************************************************/
static int vlclua_datadir( lua_State *L )
{
- lua_pushstring( L, config_GetDataDir() );
+ char *psz_data = config_GetDataDir( vlclua_get_this( L ) );
+ lua_pushstring( L, psz_data );
+ free( psz_data );
return 1;
}
static int vlclua_userdatadir( lua_State *L )
{
- lua_pushstring( L, config_GetUserDataDir() );
+ char *dir = config_GetUserDir( VLC_DATA_DIR );
+ lua_pushstring( L, dir );
+ free( dir );
return 1;
}
static int vlclua_homedir( lua_State *L )
{
- lua_pushstring( L, config_GetHomeDir() );
+ char *home = config_GetUserDir( VLC_HOME_DIR );
+ lua_pushstring( L, home );
+ free( home );
return 1;
}
static int vlclua_configdir( lua_State *L )
{
- char *dir = config_GetUserConfDir();
+ char *dir = config_GetUserDir( VLC_CONFIG_DIR );
lua_pushstring( L, dir );
free( dir );
return 1;
static int vlclua_cachedir( lua_State *L )
{
- char *dir = config_GetCacheDir();
+ char *dir = config_GetUserDir( VLC_CACHE_DIR );
lua_pushstring( L, dir );
free( dir );
return 1;
char **ppsz_dir = ppsz_dir_list;
int i = 1;
- if( vlclua_dir_list( psz_dirname, ppsz_dir_list ) != VLC_SUCCESS )
+ if( vlclua_dir_list( vlclua_get_this( L ), psz_dirname, ppsz_dir_list )
+ != VLC_SUCCESS )
return 0;
lua_newtable( L );
for( ; *ppsz_dir; ppsz_dir++ )
static int vlclua_intf_should_die( lua_State *L )
{
intf_thread_t *p_intf = (intf_thread_t*)vlclua_get_this( L );
- lua_pushboolean( L, !vlc_object_alive( p_intf ) );
+ lua_pushboolean( L, p_intf->p_sys->exiting );
return 1;
}