Commit 6a5c7191 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

VLCThumbnailer: Improve logging

parent f7668516
......@@ -124,14 +124,14 @@ parser::Task::Status VLCThumbnailer::run( parser::Task& task )
auto res = startPlayback( mp );
if ( res != parser::Task::Status::Success )
{
LOG_WARN( "Failed to generate ", file->mrl(), " thumbnail" );
LOG_WARN( "Failed to generate ", file->mrl(), " thumbnail: Can't start playback" );
return res;
}
// Seek ahead to have a significant preview
res = seekAhead( mp );
if ( res != parser::Task::Status::Success )
{
LOG_WARN( "Failed to generate ", file->mrl(), " thumbnail" );
LOG_WARN( "Failed to generate ", file->mrl(), " thumbnail: Failed to seek ahead" );
return res;
}
return takeThumbnail( media, file, mp );
......@@ -244,7 +244,10 @@ parser::Task::Status VLCThumbnailer::takeThumbnail( std::shared_ptr<Media> media
return m_thumbnailRequired == false;
});
if ( success == false )
{
LOG_WARN( "Timed out while computing ", file->mrl(), " snapshot" );
return parser::Task::Status::Error;
}
}
mp.stop();
return compress( media, file );
......
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