Commit ca254964 authored by Rémi Duraffort's avatar Rémi Duraffort

Fix #1530 : with thr rc interface you can now draw the playlist.

parent 7d55c381
...@@ -1268,6 +1268,18 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1268,6 +1268,18 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
return VLC_EGENERIC; return VLC_EGENERIC;
} }
static void print_playlist( intf_thread_t *p_intf, playlist_item_t *p_item, int i_level )
{
int i;
for( i = 0; i< p_item->i_children; i++ )
{
msg_rc( "%*s%s", 2 * i_level, "", p_item->pp_children[i]->p_input->psz_name );
if( p_item->pp_children[i]->i_children >= 0 )
print_playlist( p_intf, p_item->pp_children[i], i_level + 1 );
}
}
static int Playlist( vlc_object_t *p_this, char const *psz_cmd, static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data ) vlc_value_t oldval, vlc_value_t newval, void *p_data )
{ {
...@@ -1433,12 +1445,8 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1433,12 +1445,8 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
} }
} }
else if( !strcmp( psz_cmd, "playlist" ) ) else if( !strcmp( psz_cmd, "playlist" ) )
{ print_playlist( p_intf, p_playlist->p_root_category, 0 );
msg_Dbg( p_playlist, "Dumping category" );
playlist_NodeDump( p_playlist, p_playlist->p_root_category, 0 );
msg_Dbg( p_playlist, "Dumping Onelevel" );
playlist_NodeDump( p_playlist, p_playlist->p_root_onelevel, 0 );
}
else if( !strcmp( psz_cmd, "sort" )) else if( !strcmp( psz_cmd, "sort" ))
{ {
playlist_RecursiveNodeSort( p_playlist, p_playlist->p_root_onelevel, playlist_RecursiveNodeSort( p_playlist, p_playlist->p_root_onelevel,
......
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