* $Id$
*
* Authors: Antoine Cellerier <dionoea at videolan tod org>
- * Fabio Ritrovato <exsephiroth87 at videolan dot org>
+ * Fabio Ritrovato <sephiroth87 at videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
{
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
char **ppsz_longnames;
- char **ppsz_names = vlc_sd_GetNames( p_playlist, &ppsz_longnames );
- vlclua_release_playlist_internal( p_playlist );
+ char **ppsz_names = vlc_sd_GetNames( p_playlist, &ppsz_longnames, NULL );
if( !ppsz_names )
return 0;
const char *psz_sd = luaL_checkstring( L, 1 );
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
int i_ret = playlist_ServicesDiscoveryAdd( p_playlist, psz_sd );
- vlclua_release_playlist_internal( p_playlist );
return vlclua_push_ret( L, i_ret );
}
const char *psz_sd = luaL_checkstring( L, 1 );
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
int i_ret = playlist_ServicesDiscoveryRemove( p_playlist, psz_sd );
- vlclua_release_playlist_internal( p_playlist );
return vlclua_push_ret( L, i_ret );
}
const char *psz_sd = luaL_checkstring( L, 1 );
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
lua_pushboolean( L, playlist_IsServicesDiscoveryLoaded( p_playlist, psz_sd ));
- vlclua_release_playlist_internal( p_playlist );
return 1;
}
lua_getfield( L, -1, "title" );
if( lua_isstring( L, -1 ) )
{
- input_item_t *p_input = input_item_New( p_sd,
- "vlc://nop",
- lua_tostring( L, -1 ) );
+ char *name = strdup( lua_tostring( L, -1 ) );
lua_pop( L, 1 );
+ input_item_t *p_input = input_item_NewWithType( VLC_OBJECT( p_sd ),
+ "vlc://nop",
+ name, 0, NULL, 0,
+ -1, ITEM_TYPE_NODE );
+ free( name );
lua_getfield( L, -1, "arturl" );
if( lua_isstring( L, -1 ) )
{
lua_getfield( L, -1, "url" );
if( lua_isstring( L, -1 ) )
{
+ char **ppsz_options = NULL;
+ int i_options = 0;
char *psz_url = strdup( lua_tostring( L, -1 ) );
lua_pop( L, 1 );
- input_item_t *p_input = input_item_New( p_sd, psz_url, psz_url );
+ vlclua_read_options( p_sd, L, &i_options, &ppsz_options );
+ input_item_t *p_input = input_item_NewExt( p_sd, psz_url, psz_url,
+ i_options,
+ (const char **)ppsz_options,
+ VLC_INPUT_OPTION_TRUSTED, -1 );
free( psz_url );
vlclua_read_meta_data( p_sd, L, p_input );
/* This one is to be tested... */
lua_getfield( L, -1, "url" );
if( lua_isstring( L, -1 ) )
{
+ char **ppsz_options = NULL;
+ int i_options = 0;
char *url = strdup( lua_tostring( L, -1 ) );
lua_pop( L, 1 );
+ vlclua_read_options( p_sd, L, &i_options, &ppsz_options );
input_item_node_t *p_input_node = input_item_node_Create( *pp_node );
- input_item_t *p_input = input_item_New( p_sd, url, url );
+ input_item_t *p_input = input_item_NewExt( p_sd, url, url,
+ i_options,
+ (const char **)ppsz_options,
+ VLC_INPUT_OPTION_TRUSTED, -1 );
free( url );
vlclua_read_meta_data( p_sd, L, p_input );
/* This one is to be tested... */
char *name = strdup( lua_tostring( L, -1 ) );
lua_pop( L, 1 );
input_item_node_t *p_input_node = input_item_node_Create( *pp_node );
- input_item_t *p_input = input_item_New( p_sd, "vlc://nop",
- name );
+ input_item_t *p_input = input_item_NewWithType( VLC_OBJECT( p_sd ),
+ "vlc://nop",
+ name, 0, NULL, 0,
+ -1, ITEM_TYPE_NODE );
free( name );
lua_getfield( L, -1, "arturl" );
if( lua_isstring( L, -1 ) )