Commit 374ae903 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Handle artist when parsing metadata

parent b4224ef9
......@@ -145,6 +145,12 @@ void VLCMetadataService::parseAudioFile( VLCMetadataService::Context* ctx )
track->setGenre( genre );
free( genre );
}
char* artist = libvlc_media_get_meta( ctx->media, libvlc_meta_Artist );
if ( artist != nullptr )
{
track->setArtist( artist );
free( artist );
}
}
void VLCMetadataService::parseVideoFile( VLCMetadataService::Context* )
......
......@@ -101,6 +101,7 @@ TEST_F( VLCMetadataServices, ParseAlbum )
ASSERT_NE( track, nullptr );
ASSERT_EQ( track->title(), "Mr. Zebra" );
ASSERT_EQ( track->genre(), "Rock" );
ASSERT_EQ( track->artist(), "Tori Amos" );
auto album = track->album();
ASSERT_NE( album, nullptr );
ASSERT_EQ( album->title(), "Boys for Pele" );
......
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