[vlc-commits] lua: export playlist item's input item
Rafaël Carré
git at videolan.org
Sun Mar 25 17:42:16 CEST 2012
vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Wed Mar 21 20:40:48 2012 -0400| [c6cfea9901a8a1b6ddeeea6b5a20162681988536] | committer: Rafaël Carré
lua: export playlist item's input item
(cherry picked from commit f79f3ae2f8d39656f52482694d6b4859d20a3c86)
Signed-off-by: Rafaël Carré <funman at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=c6cfea9901a8a1b6ddeeea6b5a20162681988536
---
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 39f619e..5498520 100644
--- a/modules/lua/libs/playlist.c
+++ b/modules/lua/libs/playlist.c
@@ -42,6 +42,7 @@
#include "../vlc.h"
#include "../libs.h"
+#include "input.h"
#include "playlist.h"
#include "variables.h"
@@ -208,6 +209,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 6b9a1f7..2627253 100644
--- a/share/lua/README.txt
+++ b/share/lua/README.txt
@@ -301,6 +301,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