Commit 697d7cd5 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Jean-Baptiste Kempf

strings: Adding a 'Z' flag to insert 'Now playing' or 'Title - Artist' if...

strings: Adding a 'Z' flag to insert 'Now playing' or 'Title - Artist' if there is no now playing tag.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 91fcc5f7
......@@ -891,6 +891,20 @@ char *str_format_meta( vlc_object_t *p_object, const char *string )
*(dst+d) = '\n';
d++;
break;
case 'Z':
if( p_item )
{
char *now_playing = input_item_GetNowPlaying( p_item );
if ( now_playing == NULL )
{
INSERT_STRING( input_item_GetTitle( p_item ) );
INSERT_STRING_NO_FREE( " - " );
INSERT_STRING( input_item_GetArtist( p_item ) );
}
else
INSERT_STRING( now_playing );
}
break;
case ' ':
b_empty_if_na = true;
......
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