[vlc-devel] commit: Lua SD: use "path" instead of "url" (Fabio Ritrovato )
git version control
git at videolan.org
Sat Feb 20 15:54:18 CET 2010
vlc | branch: master | Fabio Ritrovato <sephiroth87 at videolan.org> | Sat Feb 20 15:13:03 2010 +0100| [3590d1c30ef0d80898759c33e44a0525bcb766a2] | committer: Fabio Ritrovato
Lua SD: use "path" instead of "url"
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3590d1c30ef0d80898759c33e44a0525bcb766a2
---
modules/misc/lua/libs/sd.c | 22 +++++++++++-----------
share/lua/sd/fmc.lua | 6 +++---
share/lua/sd/freebox.lua | 2 +-
share/lua/sd/frenchtv.lua | 6 +++---
4 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/modules/misc/lua/libs/sd.c b/modules/misc/lua/libs/sd.c
index 5515cd0..46ff868 100644
--- a/modules/misc/lua/libs/sd.c
+++ b/modules/misc/lua/libs/sd.c
@@ -156,19 +156,19 @@ static int vlclua_sd_add_item( lua_State *L )
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 );
@@ -191,7 +191,7 @@ static int vlclua_sd_add_item( lua_State *L )
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" );
@@ -220,20 +220,20 @@ static int vlclua_node_add_subitem( lua_State *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 *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 );
@@ -256,7 +256,7 @@ static int vlclua_node_add_subitem( lua_State *L )
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" );
diff --git a/share/lua/sd/fmc.lua b/share/lua/sd/fmc.lua
index e7ae57f..98ebf75 100644
--- a/share/lua/sd/fmc.lua
+++ b/share/lua/sd/fmc.lua
@@ -46,10 +46,10 @@ function main()
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
diff --git a/share/lua/sd/freebox.lua b/share/lua/sd/freebox.lua
index 849217a..50fb99b 100644
--- a/share/lua/sd/freebox.lua
+++ b/share/lua/sd/freebox.lua
@@ -40,7 +40,7 @@ function main()
_, _, option = string.find( line, ":(.+)" )
table.insert( options, option )
else
- vlc.sd.add_item( {url=line,duration=duration,artist=artist,title=name,options=options} )
+ vlc.sd.add_item( {path=line,duration=duration,artist=artist,title=name,options=options} )
duration = nil
artist = nil
name = nil
diff --git a/share/lua/sd/frenchtv.lua b/share/lua/sd/frenchtv.lua
index bda07b1..71013ef 100644
--- a/share/lua/sd/frenchtv.lua
+++ b/share/lua/sd/frenchtv.lua
@@ -26,7 +26,7 @@ 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
More information about the vlc-devel
mailing list