[vlmc-devel] MediaContainer: tweak log messages & simplify existence check
Hugo Beauzée-Luyssen
git at videolan.org
Mon Feb 24 16:23:33 CET 2014
vlmc | branch: ibackend | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Feb 24 16:51:04 2014 +0200| [db098ef8ecdef8f578846b118fc77f33319315e0] | committer: Hugo Beauzée-Luyssen
MediaContainer: tweak log messages & simplify existence check
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=db098ef8ecdef8f578846b118fc77f33319315e0
---
src/Library/MediaContainer.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/Library/MediaContainer.cpp b/src/Library/MediaContainer.cpp
index a369f10..cc54e60 100644
--- a/src/Library/MediaContainer.cpp
+++ b/src/Library/MediaContainer.cpp
@@ -81,11 +81,17 @@ Media*
MediaContainer::addMedia( const QFileInfo& fileInfo )
{
if ( QFile::exists( fileInfo.absoluteFilePath() ) == false )
+ {
+ vlmcCritical() << "Can't add" << fileInfo.absoluteFilePath() << ": File not found";
return NULL;
+ }
foreach( Clip* it, m_clips.values() )
{
- if ( it->getMedia()->fileInfo()->filePath() == fileInfo.filePath() )
+ if ( (*it->getMedia()->fileInfo()) == fileInfo )
+ {
+ vlmcWarning() << "Ignoring aleady imported media" << fileInfo.absolutePath();
return NULL;
+ }
}
Media* media = new Media( fileInfo.filePath() );
return media;
More information about the Vlmc-devel
mailing list