return 1;
}
-static void push_playlist_item( lua_State *L, playlist_item_t *p_item );
static void push_playlist_item( lua_State *L, playlist_item_t *p_item )
{
input_item_t *p_input = p_item->p_input;
lua_setfield( L, -2, "flags" );
if( p_input )
{
- lua_pushstring( L, p_input->psz_name );
+ char *psz_name = input_item_GetTitleFbName( p_input );
+ lua_pushstring( L, psz_name );
+ free( psz_name );
lua_setfield( L, -2, "name" );
lua_pushstring( L, p_input->psz_uri );
lua_setfield( L, -2, "path" );
switch( playlist_Status( p_playlist ) )
{
case PLAYLIST_STOPPED:
- lua_pushstring( L, "stopped" );
+ lua_pushliteral( L, "stopped" );
break;
case PLAYLIST_RUNNING:
- lua_pushstring( L, "playing" );
+ lua_pushliteral( L, "playing" );
break;
case PLAYLIST_PAUSED:
- lua_pushstring( L, "paused" );
+ lua_pushliteral( L, "paused" );
break;
default:
- lua_pushstring( L, "unknown" );
+ lua_pushliteral( L, "unknown" );
break;
}
PL_UNLOCK;