[vlc-commits] medialibrary: Ignore empty playlists for now

Hugo Beauzée-Luyssen git at videolan.org
Thu Jan 9 16:54:51 CET 2020


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Jan  9 13:18:14 2020 +0100| [bc848ae1151c4781fc1c17cf3f2511dd2442e666] | committer: Hugo Beauzée-Luyssen

medialibrary: Ignore empty playlists for now

This fixes https://code.videolan.org/videolan/medialibrary/issues/197
until we have a better handling for empty playlists

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bc848ae1151c4781fc1c17cf3f2511dd2442e666
---

 modules/misc/medialibrary/MetadataExtractor.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/misc/medialibrary/MetadataExtractor.cpp b/modules/misc/medialibrary/MetadataExtractor.cpp
index a9c714da1a..0896804f45 100644
--- a/modules/misc/medialibrary/MetadataExtractor.cpp
+++ b/modules/misc/medialibrary/MetadataExtractor.cpp
@@ -183,6 +183,10 @@ medialibrary::parser::Status MetadataExtractor::run( medialibrary::parser::IItem
     if ( !ctx.success || ctx.inputParser == nullptr )
         return medialibrary::parser::Status::Fatal;
 
+    if ( item.fileType() == medialibrary::IFile::Type::Playlist &&
+         item.nbSubItems() == 0 )
+        return medialibrary::parser::Status::Fatal;
+
     populateItem( item, ctx.inputItem.get() );
 
     return medialibrary::parser::Status::Success;



More information about the vlc-commits mailing list