Commit 6d7e63dd authored by Antoine Cellerier's avatar Antoine Cellerier

* show number of broadcast and vod media items within show command

When we end the feature freeze, we'll have to complete the show command to
show (for example) the number of clients connected
parent aa632ae8
......@@ -1743,9 +1743,22 @@ static vlm_message_t *vlm_Show( vlm_t *vlm, vlm_media_t *media,
int i, j;
vlm_message_t *msg;
vlm_message_t *msg_child;
int i_vod = 0, i_broadcast = 0;
char *psz_count;
for( i = 0; i < vlm->i_media; i++ )
{
if( vlm->media[i]->i_type == VOD_TYPE )
i_vod ++;
else
i_broadcast ++;
}
asprintf( &psz_count, "( %d broadcast - %d vod )", i_broadcast, i_vod);
msg = vlm_MessageNew( "show", NULL );
msg_child = vlm_MessageAdd( msg, vlm_MessageNew( "media", NULL ) );
msg_child = vlm_MessageAdd( msg, vlm_MessageNew( "media", psz_count ) );
free( psz_count );
for( i = 0; i < vlm->i_media; i++ )
{
......
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