[vlmc-devel] Media: Also consider IFile::Type::Entire as potential main file

Yikai Lu git at videolan.org
Fri Aug 19 12:09:39 CEST 2016


vlmc | branch: medialibrary | Yikai Lu <luyikei.qmltu at gmail.com> | Fri Aug 19 00:36:33 2016 -0500| [9d6d2db0feb4df58532a60fa99318170dda8e1d2] | committer: Hugo Beauzée-Luyssen

Media: Also consider IFile::Type::Entire as potential main file

> https://code.videolan.org/videolan/vlmc/commit/9d6d2db0feb4df58532a60fa99318170dda8e1d2
---

 src/Media/Media.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Media/Media.cpp b/src/Media/Media.cpp
index a87ec1e..c2bd872 100644
--- a/src/Media/Media.cpp
+++ b/src/Media/Media.cpp
@@ -67,7 +67,8 @@ Media::Media( medialibrary::MediaPtr media, const QUuid& uuid /* = QUuid() */ )
     Q_ASSERT( files.size() > 0 );
     for ( const auto& f : files )
     {
-        if ( f->type() == medialibrary::IFile::Type::Main )
+        if ( f->type() == medialibrary::IFile::Type::Entire ||
+             f->type() == medialibrary::IFile::Type::Main )
         {
             m_mlFile = f;
             break;



More information about the Vlmc-devel mailing list