Changeset 56a8c2a59edd99488da19825cb965ddfa823c1e2

Show
Ignore:
Timestamp:
11/01/08 18:01:35 (9 months ago)
Author:
Felix Paul Kühne <fkuehne@videolan.org>
git-committer:
Felix Paul Kühne <fkuehne@videolan.org> 1200070895 +0000
git-parent:

[5ad459b5e6c587d518bdcbbd09b949c324a91323]

git-author:
Felix Paul Kühne <fkuehne@videolan.org> 1200070895 +0000
Message:

cdda: correctly display Title and Artist in CDDB mode, if available

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/cdda.c

    rf360931 r56a8c2a  
    3636#include <vlc_input.h> 
    3737#include <vlc_access.h> 
     38#include <vlc_meta.h> 
    3839 
    3940#include <vlc_codecs.h> /* For WAVEHEADER */ 
     
    469470        if( p_sys->p_disc ) 
    470471        { 
    471             const char *psz_result; 
    472472            cddb_track_t *t = cddb_disc_get_track( p_sys->p_disc, i ); 
    473473            if( t!= NULL ) 
     
    475475                if( cddb_track_get_title( t )  != NULL ) 
    476476                { 
    477                     input_ItemAddInfo( p_input_item, _(VLC_META_INFO_CAT), 
    478                                             _(VLC_META_TITLE), 
    479                                             "%s", cddb_track_get_title( t ) ); 
    480477                    if( p_input_item->psz_name ) 
    481478                        free( p_input_item->psz_name ); 
    482479                    p_input_item->psz_name = strdup( cddb_track_get_title( t ) ); 
     480                    input_item_SetTitle( p_input_item, cddb_track_get_title( t ) ); 
    483481                } 
    484                 psz_result = cddb_track_get_artist( t ); 
    485                 if( psz_result ) 
     482                if( cddb_track_get_artist( t ) != NULL ) 
    486483                { 
    487                     input_ItemAddInfo( p_input_item, _(VLC_META_INFO_CAT), 
    488                                        _(VLC_META_ARTIST), "%s", psz_result ); 
     484                    input_item_SetArtist( p_input_item, cddb_track_get_artist( t ) ); 
    489485                } 
    490486            }