Commit cee4c63c authored by Rémi Duraffort's avatar Rémi Duraffort

taglib: cleaning.

parent 08ada199
...@@ -342,12 +342,12 @@ static int ReadMetaFromId2v2( ID3v2::Tag* tag, vlc_meta_t* p_meta ) ...@@ -342,12 +342,12 @@ static int ReadMetaFromId2v2( ID3v2::Tag* tag, vlc_meta_t* p_meta )
*/ */
static int ReadMetaFromXiph( Ogg::XiphComment* tag, vlc_meta_t* p_meta ) static int ReadMetaFromXiph( Ogg::XiphComment* tag, vlc_meta_t* p_meta )
{ {
#define SET( metaName, keyName ) \ #define SET( keyName, metaName ) \
StringList list = tag->fieldListMap()[keyName]; \ StringList list = tag->fieldListMap()[keyName]; \
if( !list.isEmpty() ) \ if( !list.isEmpty() ) \
vlc_meta_Set##metaName( p_meta, (*list.begin()).toCString( true ) ); vlc_meta_Set##metaName( p_meta, (*list.begin()).toCString( true ) );
SET( Copyright, "COPYRIGHT" ); SET( "COPYRIGHT", Copyright );
#undef SET #undef SET
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -386,10 +386,10 @@ static int ReadMeta( vlc_object_t* p_this) ...@@ -386,10 +386,10 @@ static int ReadMeta( vlc_object_t* p_this)
// Read the tags from the file // Read the tags from the file
Tag* p_tag = f.tag(); Tag* p_tag = f.tag();
#define SET( meta, tag ) \ #define SET( tag, meta ) \
if( !p_tag->tag().isNull() && !p_tag->tag().isEmpty() ) \ if( !p_tag->tag().isNull() && !p_tag->tag().isEmpty() ) \
vlc_meta_Set##meta( p_meta, p_tag->tag().toCString(true) ) vlc_meta_Set##meta( p_meta, p_tag->tag().toCString(true) )
#define SETINT( meta, tag ) \ #define SETINT( tag, meta ) \
if( p_tag->tag() ) \ if( p_tag->tag() ) \
{ \ { \
char psz_tmp[10]; \ char psz_tmp[10]; \
...@@ -397,13 +397,13 @@ static int ReadMeta( vlc_object_t* p_this) ...@@ -397,13 +397,13 @@ static int ReadMeta( vlc_object_t* p_this)
vlc_meta_Set##meta( p_meta, psz_tmp ); \ vlc_meta_Set##meta( p_meta, psz_tmp ); \
} }
SET( Title, title ); SET( title, Title );
SET( Artist, artist ); SET( artist, Artist );
SET( Album, album ); SET( album, Album );
SET( Description, comment ); SET( comment, Description );
SET( Genre, genre ); SET( genre, Genre );
SETINT( Date, year ); SETINT( year, Date );
SETINT( Tracknum, track ); SETINT( track, Tracknum );
#undef SETINT #undef SETINT
#undef SET #undef SET
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment