Commit 65514461 authored by Christophe Courtaut's avatar Christophe Courtaut Committed by christophe.courtaut@gmail.com

Url Encode filename to deal with accents

parent 7478cb86
......@@ -27,6 +27,7 @@
*/
#include <QtDebug>
#include <QUrl>
#include "Media.h"
#include "MetaDataManager.h"
......@@ -58,9 +59,9 @@ Media::Media( const QString& filePath, const QString& uuid /*= QString()*/ )
m_fileName = m_fileInfo->fileName();
setFileType();
if ( m_fileType == Media::Video || m_fileType == Media::Audio )
m_mrl = "file:///" + m_fileInfo->absoluteFilePath();
m_mrl = "file:///" + QUrl::toPercentEncoding( m_fileInfo->absoluteFilePath() );
else
m_mrl = "fake:///" + m_fileInfo->absoluteFilePath();
m_mrl = "fake:///" + QUrl::toPercentEncoding( m_fileInfo->absoluteFilePath() );
}
else
{
......
......@@ -21,6 +21,7 @@
*****************************************************************************/
#include <QtDebug>
#include <QUrl>
#include "vlmc.h"
#include "ClipWorkflow.h"
......@@ -77,9 +78,9 @@ void ClipWorkflow::initialize( bool preloading /*= false*/ )
setState( Initializing );
// qDebug() << "State is Initializing.";
if ( m_clip->getParent()->getFileType() == Media::Image )
m_vlcMedia = new LibVLCpp::Media( "fake:///" + m_clip->getParent()->getFileInfo()->absoluteFilePath() );
m_vlcMedia = new LibVLCpp::Media( "fake:///" + QUrl::toPercentEncoding( m_clip->getParent()->getFileInfo()->absoluteFilePath() ) );
else
m_vlcMedia = new LibVLCpp::Media( "file:///" + m_clip->getParent()->getFileInfo()->absoluteFilePath() );
m_vlcMedia = new LibVLCpp::Media( "file:///" + QUrl::toPercentEncoding( m_clip->getParent()->getFileInfo()->absoluteFilePath() ) );
initVlcOutput();
m_mediaPlayer = Pool<LibVLCpp::MediaPlayer>::getInstance()->get();
m_mediaPlayer->setMedia( m_vlcMedia );
......
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