Changeset 6a42724746cf15ac038540451a04f62bca3b5629

Show
Ignore:
Timestamp:
20/11/06 05:49:59 (2 years ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1163998199 +0000
git-parent:

[a743fab8519640d289eddf2bf3c5df932d5ba24a]

git-author:
Rafaël Carré <funman@videolan.org> 1163998199 +0000
Message:

Ignore empty vorbis comments (closes #704)
Comment unusued artist & album musicbrainz ids

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_meta.h

    rd3217fc r6a42724  
    7373    char *psz_arturl; 
    7474    char *psz_trackid; 
     75#if 0 //not used 
    7576    char *psz_artistid; 
    7677    char *psz_albumid; 
     78#endif 
    7779 
    7880    int i_status; 
     
    105107#define vlc_meta_SetArtURL( meta, b ) vlc_meta_Set( meta, arturl, b ); 
    106108#define vlc_meta_SetTrackID( meta, b ) vlc_meta_Set( meta, trackid, b ); 
     109#if 0 //not used 
    107110#define vlc_meta_SetArtistID( meta, b ) vlc_meta_Set( meta, artistid, b ); 
    108111#define vlc_meta_SetAlbumID( meta, b ) vlc_meta_Set( meta, albumid, b ); 
     112#endif 
    109113 
    110114 
     
    130134    m->psz_arturl = NULL; 
    131135    m->psz_trackid = NULL; 
     136#if 0 //not used 
    132137    m->psz_artistid = NULL; 
    133138    m->psz_albumid = NULL; 
     139#endif 
    134140    m->i_status = 0; 
    135141    return m; 
     
    154160    free( m->psz_encodedby ); 
    155161    free( m->psz_trackid ); 
     162#if 0 //not used 
    156163    free( m->psz_artistid ); 
    157164    free( m->psz_albumid ); 
     165#endif 
    158166    free( m->psz_arturl ); 
    159167 
     
    185193    COPY_FIELD( encodedby ); 
    186194    COPY_FIELD( trackid ); 
     195#if 0 //not used 
    187196    COPY_FIELD( artistid ); 
    188197    COPY_FIELD( albumid ); 
     198#endif 
    189199    COPY_FIELD( arturl ); 
    190200} 
  • modules/codec/vorbis.c

    r30ff712 r6a42724  
    627627            if( !strcasecmp( psz_name, "artist" ) ) 
    628628            { 
    629                 vlc_meta_SetArtist( p_input->input.p_item->p_meta, 
    630                                     psz_value ); 
    631                 input_ItemAddInfo( p_input->input.p_item, 
    632                                         _(VLC_META_INFO_CAT), _(VLC_META_ARTIST), 
     629                if( psz_value && ( *psz_value != '\0' ) ) 
     630                { 
     631                    vlc_meta_SetArtist( p_input->input.p_item->p_meta, 
     632                                        psz_value ); 
     633                    input_ItemAddInfo( p_input->input.p_item, 
     634                                        _(VLC_META_INFO_CAT), 
     635                                        _(VLC_META_ARTIST), 
    633636                                        "%s", psz_value ); 
     637                } 
    634638            } 
    635639            else if( !strcasecmp( psz_name, "title" ) ) 
    636640            { 
    637                 vlc_meta_SetTitle( p_input->input.p_item->p_meta, 
     641                if( psz_value && ( *psz_value != '\0' ) ) 
     642                { 
     643                    vlc_meta_SetTitle( p_input->input.p_item->p_meta, 
    638644                                    psz_value ); 
    639                 p_input->input.p_item->psz_name = strdup( psz_value ); 
     645                    p_input->input.p_item->psz_name = strdup( psz_value ); 
     646                } 
    640647            } 
    641648            else if( !strcasecmp( psz_name, "album" ) ) 
    642649            { 
    643                 vlc_meta_SetAlbum( p_input->input.p_item->p_meta, 
     650                if( psz_value && ( *psz_value != '\0' ) ) 
     651                { 
     652                    vlc_meta_SetAlbum( p_input->input.p_item->p_meta, 
    644653                                    psz_value ); 
     654                } 
    645655            } 
    646656            else if( !strcasecmp( psz_name, "musicbrainz_trackid" ) ) 
    647657            { 
    648                 vlc_meta_SetTrackID( p_input->input.p_item->p_meta, 
     658                if( psz_value && ( *psz_value != '\0' ) ) 
     659                { 
     660                    vlc_meta_SetTrackID( p_input->input.p_item->p_meta, 
    649661                                    psz_value ); 
     662                } 
    650663            } 
     664#if 0 //not used 
    651665            else if( !strcasecmp( psz_name, "musicbrainz_artistid" ) ) 
    652666            { 
    653                 vlc_meta_SetArtistID( p_input->input.p_item->p_meta, 
     667                if( psz_value && ( *psz_value != '\0' ) ) 
     668                { 
     669                    vlc_meta_SetArtistID( p_input->input.p_item->p_meta, 
    654670                                    psz_value ); 
     671                } 
    655672            } 
    656673            else if( !strcasecmp( psz_name, "musicbrainz_albumid" ) ) 
    657674            { 
    658                 vlc_meta_SetAlbumID( p_input->input.p_item->p_meta, 
     675                if( psz_value && ( *psz_value != '\0' ) ) 
     676                { 
     677                    vlc_meta_SetAlbumID( p_input->input.p_item->p_meta, 
    659678                                    psz_value ); 
     679                } 
    660680            } 
     681#endif 
    661682        } 
    662683        /* FIXME */ 
  • modules/meta_engine/id3tag.c

    r1a3692e r6a42724  
    9292        i++; 
    9393    } 
    94  
     94#if 0 //not used 
    9595    i = 0; 
    9696 
     
    119119        i++; 
    120120    } 
    121      
     121#endif 
    122122    i = 0; 
    123123