char *psz_encodedby;
char *psz_arturl;
char *psz_trackid;
+#if 0 //not used
char *psz_artistid;
char *psz_albumid;
+#endif
int i_status;
#if 0
#define vlc_meta_SetEncodedBy( meta, b ) vlc_meta_Set( meta, encodedby, b );
#define vlc_meta_SetArtURL( meta, b ) vlc_meta_Set( meta, arturl, b );
#define vlc_meta_SetTrackID( meta, b ) vlc_meta_Set( meta, trackid, b );
+#if 0 //not used
#define vlc_meta_SetArtistID( meta, b ) vlc_meta_Set( meta, artistid, b );
#define vlc_meta_SetAlbumID( meta, b ) vlc_meta_Set( meta, albumid, b );
+#endif
static inline vlc_meta_t *vlc_meta_New( void )
m->psz_encodedby = NULL;
m->psz_arturl = NULL;
m->psz_trackid = NULL;
+#if 0 //not used
m->psz_artistid = NULL;
m->psz_albumid = NULL;
+#endif
m->i_status = 0;
return m;
}
free( m->psz_publisher );
free( m->psz_encodedby );
free( m->psz_trackid );
+#if 0 //not used
free( m->psz_artistid );
free( m->psz_albumid );
+#endif
free( m->psz_arturl );
free( m );
COPY_FIELD( publisher );
COPY_FIELD( encodedby );
COPY_FIELD( trackid );
+#if 0 //not used
COPY_FIELD( artistid );
COPY_FIELD( albumid );
+#endif
COPY_FIELD( arturl );
}
/** \todo Track meta */
psz_name, psz_value );
if( !strcasecmp( psz_name, "artist" ) )
{
- vlc_meta_SetArtist( p_input->input.p_item->p_meta,
- psz_value );
- input_ItemAddInfo( p_input->input.p_item,
- _(VLC_META_INFO_CAT), _(VLC_META_ARTIST),
+ if( psz_value && ( *psz_value != '\0' ) )
+ {
+ vlc_meta_SetArtist( p_input->input.p_item->p_meta,
+ psz_value );
+ input_ItemAddInfo( p_input->input.p_item,
+ _(VLC_META_INFO_CAT),
+ _(VLC_META_ARTIST),
"%s", psz_value );
+ }
}
else if( !strcasecmp( psz_name, "title" ) )
{
- vlc_meta_SetTitle( p_input->input.p_item->p_meta,
+ if( psz_value && ( *psz_value != '\0' ) )
+ {
+ vlc_meta_SetTitle( p_input->input.p_item->p_meta,
psz_value );
- p_input->input.p_item->psz_name = strdup( psz_value );
+ p_input->input.p_item->psz_name = strdup( psz_value );
+ }
}
else if( !strcasecmp( psz_name, "album" ) )
{
- vlc_meta_SetAlbum( p_input->input.p_item->p_meta,
+ if( psz_value && ( *psz_value != '\0' ) )
+ {
+ vlc_meta_SetAlbum( p_input->input.p_item->p_meta,
psz_value );
+ }
}
else if( !strcasecmp( psz_name, "musicbrainz_trackid" ) )
{
- vlc_meta_SetTrackID( p_input->input.p_item->p_meta,
+ if( psz_value && ( *psz_value != '\0' ) )
+ {
+ vlc_meta_SetTrackID( p_input->input.p_item->p_meta,
psz_value );
+ }
}
+#if 0 //not used
else if( !strcasecmp( psz_name, "musicbrainz_artistid" ) )
{
- vlc_meta_SetArtistID( p_input->input.p_item->p_meta,
+ if( psz_value && ( *psz_value != '\0' ) )
+ {
+ vlc_meta_SetArtistID( p_input->input.p_item->p_meta,
psz_value );
+ }
}
else if( !strcasecmp( psz_name, "musicbrainz_albumid" ) )
{
- vlc_meta_SetAlbumID( p_input->input.p_item->p_meta,
+ if( psz_value && ( *psz_value != '\0' ) )
+ {
+ vlc_meta_SetAlbumID( p_input->input.p_item->p_meta,
psz_value );
+ }
}
+#endif
}
/* FIXME */
var_SetInteger( p_input, "item-change", p_input->input.p_item->i_id );