services_discovery_t *p_sd = (services_discovery_t *)vlclua_get_this( L );
if( lua_istable( L, -1 ) )
{
- lua_getfield( L, -1, "url" );
+ lua_getfield( L, -1, "path" );
if( lua_isstring( L, -1 ) )
{
char **ppsz_options = NULL;
int i_options = 0;
- char *psz_url = strdup( lua_tostring( L, -1 ) );
+ char *psz_path = strdup( lua_tostring( L, -1 ) );
lua_pop( L, 1 );
vlclua_read_options( p_sd, L, &i_options, &ppsz_options );
- input_item_t *p_input = input_item_NewExt( p_sd, psz_url, psz_url,
+ input_item_t *p_input = input_item_NewExt( p_sd, psz_path, psz_path,
i_options,
(const char **)ppsz_options,
VLC_INPUT_OPTION_TRUSTED, -1 );
- free( psz_url );
+ free( psz_path );
vlclua_read_meta_data( p_sd, L, p_input );
/* This one is to be tested... */
vlclua_read_custom_meta_data( p_sd, L, p_input );
lua_setmetatable( L, -2 );
}
else
- msg_Err( p_sd, "vlc.sd.add_item: the \"url\" parameter can't be empty" );
+ msg_Err( p_sd, "vlc.sd.add_item: the \"path\" parameter can't be empty" );
}
else
msg_Err( p_sd, "Error parsing add_item arguments" );
{
if( lua_istable( L, -1 ) )
{
- lua_getfield( L, -1, "url" );
+ lua_getfield( L, -1, "path" );
if( lua_isstring( L, -1 ) )
{
char **ppsz_options = NULL;
int i_options = 0;
- char *url = strdup( lua_tostring( L, -1 ) );
+ char *psz_path = 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_NewExt( p_sd, url, url,
- i_options,
+ input_item_t *p_input = input_item_NewExt( p_sd, psz_path,
+ psz_path, i_options,
(const char **)ppsz_options,
VLC_INPUT_OPTION_TRUSTED, -1 );
- free( url );
+ free( psz_path );
vlclua_read_meta_data( p_sd, L, p_input );
/* This one is to be tested... */
vlclua_read_custom_meta_data( p_sd, L, p_input );
lua_setmetatable( L, -2 );
}
else
- msg_Err( p_sd, "node:add_subitem: the \"url\" parameter can't be empty" );
+ msg_Err( p_sd, "node:add_subitem: the \"path\" parameter can't be empty" );
}
else
msg_Err( p_sd, "Error parsing add_subitem arguments" );
else
votes = "Votes: N/A"
end
- songs_node:add_subitem( {url=song_node.children_map["url"][1].children[1],title=title,artist=artist,description=rank .. ", " .. votes} )
+ songs_node:add_subitem( {path=song_node.children_map["url"][1].children[1],title=title,artist=artist,description=rank .. ", " .. votes} )
end
end
- node:add_subitem( {title=show_node.children_map["date"][1].children[1] .. " MP3 Podcast",url=show_node.children_map["podcastmp3"][1].children[1]} )
- node:add_subitem( {title=show_node.children_map["date"][1].children[1] .. " OGG Podcast",url=show_node.children_map["podcastogg"][1].children[1]} )
+ node:add_subitem( {title=show_node.children_map["date"][1].children[1] .. " MP3 Podcast",path=show_node.children_map["podcastmp3"][1].children[1]} )
+ node:add_subitem( {title=show_node.children_map["date"][1].children[1] .. " OGG Podcast",path=show_node.children_map["podcastogg"][1].children[1]} )
end
end
function main()
node = vlc.sd.add_node( {title="Canal +"} )
- node:add_subitem( {title="Le SAV des émissions ",url="http://www.canalplus.fr/index.php?pid=1782",options={"http-forward-cookies"}} )
- node:add_subitem( {title="Les Guignols",url="http://www.canalplus.fr/index.php?pid=1784",options={"http-forward-cookies"}} )
- node:add_subitem( {title="La Météo de Pauline Lefevre",url="http://www.canalplus.fr/index.php?pid=2834",options={"http-forward-cookies"}} )
+ node:add_subitem( {title="Le SAV des émissions ",path="http://www.canalplus.fr/index.php?pid=1782",options={"http-forward-cookies"}} )
+ node:add_subitem( {title="Les Guignols",path="http://www.canalplus.fr/index.php?pid=1784",options={"http-forward-cookies"}} )
+ node:add_subitem( {title="La Météo de Pauline Lefevre",path="http://www.canalplus.fr/index.php?pid=2834",options={"http-forward-cookies"}} )
end