Commit 9d179404 authored by Yoann Peronneau's avatar Yoann Peronneau

* control/http: fix "pl.current"

parent 82c2d527
...@@ -425,8 +425,16 @@ void E_(PlaylistListNode)( intf_thread_t *p_intf, playlist_t *p_pl, ...@@ -425,8 +425,16 @@ void E_(PlaylistListNode)( intf_thread_t *p_intf, playlist_t *p_pl,
char *psz; char *psz;
mvar_t *itm = E_(mvar_New)( name, "set" ); mvar_t *itm = E_(mvar_New)( name, "set" );
sprintf( value, "%d", ( p_pl->status.p_item == p_node )? 1 : 0 ); if( p_pl->status.p_item && p_node &&
E_(mvar_AppendNewVar)( itm, "current", value ); p_pl->status.p_item->p_input && p_node->p_input &&
p_pl->status.p_item->p_input->i_id == p_node->p_input->i_id )
{
E_(mvar_AppendNewVar)( itm, "current", "1" );
}
else
{
E_(mvar_AppendNewVar)( itm, "current", "0" );
}
sprintf( value, "%d", p_node->p_input->i_id ); sprintf( value, "%d", p_node->p_input->i_id );
E_(mvar_AppendNewVar)( itm, "index", value ); E_(mvar_AppendNewVar)( itm, "index", value );
......
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