From 56a8c2a59edd99488da19825cb965ddfa823c1e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20Paul=20K=C3=BChne?= Date: Fri, 11 Jan 2008 17:01:35 +0000 Subject: [PATCH] cdda: correctly display Title and Artist in CDDB mode, if available --- modules/access/cdda.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/modules/access/cdda.c b/modules/access/cdda.c index e75899efe8..0668bcdebb 100644 --- a/modules/access/cdda.c +++ b/modules/access/cdda.c @@ -35,6 +35,7 @@ #include #include #include +#include #include /* For WAVEHEADER */ #include "vcd/cdrom.h" @@ -468,24 +469,19 @@ static int GetTracks( access_t *p_access, /* If we have CDDB info, change the name */ if( p_sys->p_disc ) { - const char *psz_result; cddb_track_t *t = cddb_disc_get_track( p_sys->p_disc, i ); if( t!= NULL ) { if( cddb_track_get_title( t ) != NULL ) { - input_ItemAddInfo( p_input_item, _(VLC_META_INFO_CAT), - _(VLC_META_TITLE), - "%s", cddb_track_get_title( t ) ); if( p_input_item->psz_name ) free( p_input_item->psz_name ); p_input_item->psz_name = strdup( cddb_track_get_title( t ) ); + input_item_SetTitle( p_input_item, cddb_track_get_title( t ) ); } - psz_result = cddb_track_get_artist( t ); - if( psz_result ) + if( cddb_track_get_artist( t ) != NULL ) { - input_ItemAddInfo( p_input_item, _(VLC_META_INFO_CAT), - _(VLC_META_ARTIST), "%s", psz_result ); + input_item_SetArtist( p_input_item, cddb_track_get_artist( t ) ); } } } -- 2.39.2