]> git.sesse.net Git - vlc/commitdiff
Qt: fix str_format_meta (closes #4777)
authorFrancois Cartegnie <fcvlcdev@free.fr>
Mon, 13 Jun 2011 19:06:05 +0000 (21:06 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Mon, 13 Jun 2011 19:09:21 +0000 (21:09 +0200)
src/text/strings.c

index 3bc335b629655de2f36d6092bc468a8644d80f3b..e1d63563a875a688b7518381d64df08a523252b8 100644 (file)
@@ -905,12 +905,14 @@ char *str_format_meta( vlc_object_t *p_object, const char *string )
                         if ( now_playing == NULL )
                         {
                             char *temp = input_item_GetTitleFbName( p_item );
+                            char *psz_artist = input_item_GetArtist( p_item );
                             if( !EMPTY_STR( temp ) )
                             {
                                 INSERT_STRING( temp );
-                                INSERT_STRING_NO_FREE( " - " );
+                                if ( !EMPTY_STR( psz_artist ) )
+                                    INSERT_STRING_NO_FREE( " - " );
                             }
-                            INSERT_STRING( input_item_GetArtist( p_item ) );
+                            INSERT_STRING( psz_artist );
                         }
                         else
                             INSERT_STRING( now_playing );