Commit 83470664 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

MetadataParser: Use video embedded covers if any

Fix #35
parent d576752c
......@@ -336,11 +336,15 @@ bool MetadataParser::parseVideoFile( parser::Task& task ) const
return true;
const auto& showName = task.vlcMedia.meta( libvlc_meta_ShowName );
const auto& artworkMrl = task.vlcMedia.meta( libvlc_meta_ArtworkURL );
return sqlite::Tools::withRetries( 3, [this, &showName, &title, &task]() {
return sqlite::Tools::withRetries( 3, [this, &showName, &title, &task, &artworkMrl]() {
auto t = m_ml->getConn()->newTransaction();
task.media->setTitleBuffered( title );
if ( artworkMrl.empty() == false )
task.media->setThumbnail( artworkMrl, Thumbnail::Origin::Media );
if ( showName.length() != 0 )
{
auto show = m_ml->show( showName );
......
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