Commit f79f3ae2 authored by Rafaël Carré's avatar Rafaël Carré

lua: export playlist item's input item

parent bd2623d8
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "../vlc.h" #include "../vlc.h"
#include "../libs.h" #include "../libs.h"
#include "input.h"
#include "playlist.h" #include "playlist.h"
#include "variables.h" #include "variables.h"
...@@ -205,6 +206,7 @@ static void push_playlist_item( lua_State *L, playlist_item_t *p_item ) ...@@ -205,6 +206,7 @@ static void push_playlist_item( lua_State *L, playlist_item_t *p_item )
lua_setfield( L, -2, "duration" ); lua_setfield( L, -2, "duration" );
lua_pushinteger( L, p_input->i_nb_played ); lua_pushinteger( L, p_input->i_nb_played );
lua_setfield( L, -2, "nb_played" ); lua_setfield( L, -2, "nb_played" );
luaopen_input_item( L, p_input );
/* TODO: add (optional) info categories, meta, options, es */ /* TODO: add (optional) info categories, meta, options, es */
} }
if( p_item->i_children >= 0 ) if( p_item->i_children >= 0 )
......
...@@ -299,6 +299,7 @@ playlist.get( [what, [tree]] ): Get the playlist. ...@@ -299,6 +299,7 @@ playlist.get( [what, [tree]] ): Get the playlist.
playlist will be returned in a tree layout. If set to false, the playlist playlist will be returned in a tree layout. If set to false, the playlist
will be returned using the flat layout. will be returned using the flat layout.
Each playlist item returned will have the following members: Each playlist item returned will have the following members:
.item: The input item.
.id: The item's id. .id: The item's id.
.flags: a table with the following members if the corresponding flag is .flags: a table with the following members if the corresponding flag is
set: set:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment