Commit 48030dba authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Handle artwork url when parsing metadata

parent 374ae903
......@@ -119,6 +119,12 @@ void VLCMetadataService::parseAudioFile( VLCMetadataService::Context* ctx )
std::cerr << "Failed to get track id" << std::endl;
return ;
}
char* artwork = libvlc_media_get_meta( ctx->media, libvlc_meta_ArtworkURL );
if ( artwork != nullptr )
{
album->setArtworkUrl( artwork );
free( artwork );
}
char* trackTitle = libvlc_media_get_meta( ctx->media, libvlc_meta_Title );
std::string title;
if ( trackTitle == nullptr )
......
......@@ -105,6 +105,7 @@ TEST_F( VLCMetadataServices, ParseAlbum )
auto album = track->album();
ASSERT_NE( album, nullptr );
ASSERT_EQ( album->title(), "Boys for Pele" );
ASSERT_NE( album->artworkUrl().length(), 0u );
auto album2 = ml->album( "Boys for Pele" );
ASSERT_EQ( album, album2 );
......
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