Commit c73cb845 authored by Timothy B. Terriberry's avatar Timothy B. Terriberry Committed by Jean-Baptiste Kempf

Sort Xiph tag checks.

This places them in the same order as they appear in vlc_meta.h to
make it easier to see which ones are present and which ones are
missing.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 0b429f0a
...@@ -154,14 +154,14 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta, ...@@ -154,14 +154,14 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta,
/* */ /* */
bool hasTitle = false; bool hasTitle = false;
bool hasAlbum = false;
bool hasTrackTotal = false;
bool hasArtist = false; bool hasArtist = false;
bool hasGenre = false;
bool hasCopyright = false; bool hasCopyright = false;
bool hasAlbum = false;
bool hasDescription = false; bool hasDescription = false;
bool hasGenre = false;
bool hasDate = false; bool hasDate = false;
bool hasPublisher = false; bool hasPublisher = false;
bool hasTrackTotal = false;
for( ; i_comment > 0; i_comment-- ) for( ; i_comment > 0; i_comment-- )
{ {
...@@ -196,6 +196,9 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta, ...@@ -196,6 +196,9 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta,
has##var = true; \ has##var = true; \
} }
IF_EXTRACT("TITLE=", Title ) IF_EXTRACT("TITLE=", Title )
else IF_EXTRACT("ARTIST=", Artist )
else IF_EXTRACT("GENRE=", Genre )
else IF_EXTRACT("COPYRIGHT=", Copyright )
else IF_EXTRACT("ALBUM=", Album ) else IF_EXTRACT("ALBUM=", Album )
else if( !strncasecmp(psz_comment, "TRACKNUMBER=", strlen("TRACKNUMBER=" ) ) ) else if( !strncasecmp(psz_comment, "TRACKNUMBER=", strlen("TRACKNUMBER=" ) ) )
{ {
...@@ -218,13 +221,10 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta, ...@@ -218,13 +221,10 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta,
else if( !strncasecmp(psz_comment, "TOTALTRACKS=", strlen("TOTALTRACKS="))) else if( !strncasecmp(psz_comment, "TOTALTRACKS=", strlen("TOTALTRACKS=")))
vlc_meta_Set( p_meta, vlc_meta_TrackTotal, &psz_comment[strlen("TOTALTRACKS=")] ); vlc_meta_Set( p_meta, vlc_meta_TrackTotal, &psz_comment[strlen("TOTALTRACKS=")] );
else IF_EXTRACT("TOTALTRACKS=", TrackTotal ) else IF_EXTRACT("TOTALTRACKS=", TrackTotal )
else IF_EXTRACT("ARTIST=", Artist )
else IF_EXTRACT("COPYRIGHT=", Copyright )
else IF_EXTRACT("ORGANIZATION=", Publisher )
else IF_EXTRACT("DESCRIPTION=", Description ) else IF_EXTRACT("DESCRIPTION=", Description )
else IF_EXTRACT("COMMENTS=", Description ) else IF_EXTRACT("COMMENTS=", Description )
else IF_EXTRACT("GENRE=", Genre )
else IF_EXTRACT("DATE=", Date ) else IF_EXTRACT("DATE=", Date )
else IF_EXTRACT("ORGANIZATION=", Publisher )
else if( !strncasecmp( psz_comment, "METADATA_BLOCK_PICTURE=", strlen("METADATA_BLOCK_PICTURE="))) else if( !strncasecmp( psz_comment, "METADATA_BLOCK_PICTURE=", strlen("METADATA_BLOCK_PICTURE=")))
{ {
if( attachments == NULL ) if( attachments == NULL )
......
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