#include "../vlc.h"
#include "input.h"
-#include "playlist.h"
#include "../libs.h"
#include "../extension.h"
-static const luaL_Reg vlclua_input_reg[];
-static const luaL_Reg vlclua_input_item_reg[];
-
static input_item_t* vlclua_input_item_get_internal( lua_State *L );
input_thread_t * vlclua_get_input_internal( lua_State *L )
PUSH_META( ArtworkURL, "artwork_url" );
PUSH_META( TrackID, "track_id" );
PUSH_META( TrackTotal, "track_total" );
+ PUSH_META( Director, "director" );
+ PUSH_META( Season, "season" );
+ PUSH_META( Episode, "episode" );
+ PUSH_META( ShowName, "show_name" );
+ PUSH_META( Actors, "actors" );
#undef PUSH_META
if( !p_input )
return luaL_error( L, "can't add subtitle: no current input" );
if( !lua_isstring( L, 1 ) )
- return luaL_error( L, "vlc.input.add_subtitle() usage: (url)" );
- const char *psz_url = luaL_checkstring( L, 1 );
- input_AddSubtitle( p_input, psz_url, false );
+ return luaL_error( L, "vlc.input.add_subtitle() usage: (path)" );
+ const char *psz_path = luaL_checkstring( L, 1 );
+ input_AddSubtitle( p_input, psz_path, false );
vlc_object_release( p_input );
return 1;
}
return 1;
}
-static int vlclua_input_item_get( lua_State *L, input_item_t *p_item )
-{
- vlc_gc_incref( p_item );
- input_item_t **pp = lua_newuserdata( L, sizeof( input_item_t* ) );
- *pp = p_item;
-
- if( luaL_newmetatable( L, "input_item" ) )
- {
- lua_newtable( L );
- luaL_register( L, NULL, vlclua_input_item_reg );
- lua_setfield( L, -2, "__index" );
- lua_pushcfunction( L, vlclua_input_item_delete );
- lua_setfield( L, -2, "__gc" );
- }
-
- lua_setmetatable(L, -2);
-
- return 1;
-}
+static int vlclua_input_item_get( lua_State *L, input_item_t *p_item );
static int vlclua_input_item_get_current( lua_State *L )
{
META_TYPE( ArtworkURL, "artwork_url" )
META_TYPE( TrackID, "track_id" )
META_TYPE( TrackTotal, "track_total" )
+ META_TYPE( Director, "director" )
+ META_TYPE( Season, "season" )
+ META_TYPE( Episode, "episode" )
+ META_TYPE( ShowName, "show_name" )
+ META_TYPE( Actors, "actors" )
+ META_TYPE( AlbumArtist, "album_artist" )
};
#undef META_TYPE
{ NULL, NULL }
};
+static int vlclua_input_item_get( lua_State *L, input_item_t *p_item )
+{
+ vlc_gc_incref( p_item );
+ input_item_t **pp = lua_newuserdata( L, sizeof( input_item_t* ) );
+ *pp = p_item;
+
+ if( luaL_newmetatable( L, "input_item" ) )
+ {
+ lua_newtable( L );
+ luaL_register( L, NULL, vlclua_input_item_reg );
+ lua_setfield( L, -2, "__index" );
+ lua_pushcfunction( L, vlclua_input_item_delete );
+ lua_setfield( L, -2, "__gc" );
+ }
+
+ lua_setmetatable(L, -2);
+
+ return 1;
+}
+
void luaopen_input_item( lua_State *L, input_item_t *item )
{