Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
3590d1c3
Commit
3590d1c3
authored
Feb 20, 2010
by
Fabio Ritrovato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua SD: use "path" instead of "url"
parent
bad5a049
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
18 deletions
+18
-18
modules/misc/lua/libs/sd.c
modules/misc/lua/libs/sd.c
+11
-11
share/lua/sd/fmc.lua
share/lua/sd/fmc.lua
+3
-3
share/lua/sd/freebox.lua
share/lua/sd/freebox.lua
+1
-1
share/lua/sd/frenchtv.lua
share/lua/sd/frenchtv.lua
+3
-3
No files found.
modules/misc/lua/libs/sd.c
View file @
3590d1c3
...
@@ -156,19 +156,19 @@ static int vlclua_sd_add_item( lua_State *L )
...
@@ -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
);
services_discovery_t
*
p_sd
=
(
services_discovery_t
*
)
vlclua_get_this
(
L
);
if
(
lua_istable
(
L
,
-
1
)
)
if
(
lua_istable
(
L
,
-
1
)
)
{
{
lua_getfield
(
L
,
-
1
,
"
url
"
);
lua_getfield
(
L
,
-
1
,
"
path
"
);
if
(
lua_isstring
(
L
,
-
1
)
)
if
(
lua_isstring
(
L
,
-
1
)
)
{
{
char
**
ppsz_options
=
NULL
;
char
**
ppsz_options
=
NULL
;
int
i_options
=
0
;
int
i_options
=
0
;
char
*
psz_
url
=
strdup
(
lua_tostring
(
L
,
-
1
)
);
char
*
psz_
path
=
strdup
(
lua_tostring
(
L
,
-
1
)
);
lua_pop
(
L
,
1
);
lua_pop
(
L
,
1
);
vlclua_read_options
(
p_sd
,
L
,
&
i_options
,
&
ppsz_options
);
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
,
i_options
,
(
const
char
**
)
ppsz_options
,
(
const
char
**
)
ppsz_options
,
VLC_INPUT_OPTION_TRUSTED
,
-
1
);
VLC_INPUT_OPTION_TRUSTED
,
-
1
);
free
(
psz_
url
);
free
(
psz_
path
);
vlclua_read_meta_data
(
p_sd
,
L
,
p_input
);
vlclua_read_meta_data
(
p_sd
,
L
,
p_input
);
/* This one is to be tested... */
/* This one is to be tested... */
vlclua_read_custom_meta_data
(
p_sd
,
L
,
p_input
);
vlclua_read_custom_meta_data
(
p_sd
,
L
,
p_input
);
...
@@ -191,7 +191,7 @@ static int vlclua_sd_add_item( lua_State *L )
...
@@ -191,7 +191,7 @@ static int vlclua_sd_add_item( lua_State *L )
lua_setmetatable
(
L
,
-
2
);
lua_setmetatable
(
L
,
-
2
);
}
}
else
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
else
msg_Err
(
p_sd
,
"Error parsing add_item arguments"
);
msg_Err
(
p_sd
,
"Error parsing add_item arguments"
);
...
@@ -220,20 +220,20 @@ static int vlclua_node_add_subitem( lua_State *L )
...
@@ -220,20 +220,20 @@ static int vlclua_node_add_subitem( lua_State *L )
{
{
if
(
lua_istable
(
L
,
-
1
)
)
if
(
lua_istable
(
L
,
-
1
)
)
{
{
lua_getfield
(
L
,
-
1
,
"
url
"
);
lua_getfield
(
L
,
-
1
,
"
path
"
);
if
(
lua_isstring
(
L
,
-
1
)
)
if
(
lua_isstring
(
L
,
-
1
)
)
{
{
char
**
ppsz_options
=
NULL
;
char
**
ppsz_options
=
NULL
;
int
i_options
=
0
;
int
i_options
=
0
;
char
*
url
=
strdup
(
lua_tostring
(
L
,
-
1
)
);
char
*
psz_path
=
strdup
(
lua_tostring
(
L
,
-
1
)
);
lua_pop
(
L
,
1
);
lua_pop
(
L
,
1
);
vlclua_read_options
(
p_sd
,
L
,
&
i_options
,
&
ppsz_options
);
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_node_t
*
p_input_node
=
input_item_node_Create
(
*
pp_node
);
input_item_t
*
p_input
=
input_item_NewExt
(
p_sd
,
url
,
url
,
input_item_t
*
p_input
=
input_item_NewExt
(
p_sd
,
psz_path
,
i_options
,
psz_path
,
i_options
,
(
const
char
**
)
ppsz_options
,
(
const
char
**
)
ppsz_options
,
VLC_INPUT_OPTION_TRUSTED
,
-
1
);
VLC_INPUT_OPTION_TRUSTED
,
-
1
);
free
(
url
);
free
(
psz_path
);
vlclua_read_meta_data
(
p_sd
,
L
,
p_input
);
vlclua_read_meta_data
(
p_sd
,
L
,
p_input
);
/* This one is to be tested... */
/* This one is to be tested... */
vlclua_read_custom_meta_data
(
p_sd
,
L
,
p_input
);
vlclua_read_custom_meta_data
(
p_sd
,
L
,
p_input
);
...
@@ -256,7 +256,7 @@ static int vlclua_node_add_subitem( lua_State *L )
...
@@ -256,7 +256,7 @@ static int vlclua_node_add_subitem( lua_State *L )
lua_setmetatable
(
L
,
-
2
);
lua_setmetatable
(
L
,
-
2
);
}
}
else
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
else
msg_Err
(
p_sd
,
"Error parsing add_subitem arguments"
);
msg_Err
(
p_sd
,
"Error parsing add_subitem arguments"
);
...
...
share/lua/sd/fmc.lua
View file @
3590d1c3
...
@@ -46,10 +46,10 @@ function main()
...
@@ -46,10 +46,10 @@ function main()
else
else
votes
=
"Votes: N/A"
votes
=
"Votes: N/A"
end
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
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
]
..
" 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"
,
url
=
show_node
.
children_map
[
"podcastogg"
][
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
end
end
share/lua/sd/freebox.lua
View file @
3590d1c3
...
@@ -40,7 +40,7 @@ function main()
...
@@ -40,7 +40,7 @@ function main()
_
,
_
,
option
=
string.find
(
line
,
":(.+)"
)
_
,
_
,
option
=
string.find
(
line
,
":(.+)"
)
table.insert
(
options
,
option
)
table.insert
(
options
,
option
)
else
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
duration
=
nil
artist
=
nil
artist
=
nil
name
=
nil
name
=
nil
...
...
share/lua/sd/frenchtv.lua
View file @
3590d1c3
...
@@ -26,7 +26,7 @@ end
...
@@ -26,7 +26,7 @@ end
function
main
()
function
main
()
node
=
vlc
.
sd
.
add_node
(
{
title
=
"Canal +"
}
)
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
=
"Le SAV des émissions "
,
path
=
"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
=
"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"
,
url
=
"http://www.canalplus.fr/index.php?pid=2834"
,
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
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment