[vlc-commits] lua: export playlist item's input item
Rafaël Carré
git at videolan.org
Thu Mar 22 01:42:21 CET 2012
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed Mar 21 20:40:48 2012 -0400| [f79f3ae2f8d39656f52482694d6b4859d20a3c86] | committer: Rafaël Carré
lua: export playlist item's input item
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f79f3ae2f8d39656f52482694d6b4859d20a3c86
---
modules/lua/libs/playlist.c | 2 ++
share/lua/README.txt | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/lua/libs/playlist.c b/modules/lua/libs/playlist.c
index 7b1f697..e9dbfc9 100644
--- a/modules/lua/libs/playlist.c
+++ b/modules/lua/libs/playlist.c
@@ -39,6 +39,7 @@
#include "../vlc.h"
#include "../libs.h"
+#include "input.h"
#include "playlist.h"
#include "variables.h"
@@ -205,6 +206,7 @@ static void push_playlist_item( lua_State *L, playlist_item_t *p_item )
lua_setfield( L, -2, "duration" );
lua_pushinteger( L, p_input->i_nb_played );
lua_setfield( L, -2, "nb_played" );
+ luaopen_input_item( L, p_input );
/* TODO: add (optional) info categories, meta, options, es */
}
if( p_item->i_children >= 0 )
diff --git a/share/lua/README.txt b/share/lua/README.txt
index a08031f..d757b76 100644
--- a/share/lua/README.txt
+++ b/share/lua/README.txt
@@ -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
will be returned using the flat layout.
Each playlist item returned will have the following members:
+ .item: The input item.
.id: The item's id.
.flags: a table with the following members if the corresponding flag is
set:
More information about the vlc-commits
mailing list