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

VLCMetadataService: Specify the file type as soon as we know it

parent 1d819d59
......@@ -104,6 +104,7 @@ ServiceStatus VLCMetadataService::handleMediaMeta( FilePtr file, VLC::Media& med
bool VLCMetadataService::parseAudioFile( FilePtr file, VLC::Media& media ) const
{
file->setType( IFile::Type::AudioType );
auto albumTitle = media.meta( libvlc_meta_Album );
if ( albumTitle.length() == 0 )
return true;
......@@ -154,6 +155,7 @@ bool VLCMetadataService::parseAudioFile( FilePtr file, VLC::Media& media ) const
bool VLCMetadataService::parseVideoFile( FilePtr file, VLC::Media& media ) const
{
file->setType( IFile::Type::VideoType );
auto title = media.meta( libvlc_meta_Title );
if ( title.length() == 0 )
return true;
......
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