Commit 0925621b authored by Pierre Lamot's avatar Pierre Lamot Committed by Jean-Baptiste Kempf

skin2: fix opening playlist

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 39d49cef
......@@ -616,7 +616,14 @@ void DialogsProvider::openAPlaylist()
EXT_FILTER_PLAYLIST );
foreach( const QString &url, urls )
{
playlist_Import( THEPL, qtu( url ) );
char* psz_path = vlc_uri2path(qtu( url ));
if ( !psz_path )
{
msg_Warn( p_intf, "unable to load playlist '%s'", qtu( url ) );
continue;
}
playlist_Import( THEPL, psz_path );
free( psz_path );
}
}
......
......@@ -24,6 +24,7 @@
#include "cmd_playlist.hpp"
#include <vlc_playlist.h>
#include <vlc_url.h>
#include "../src/vlcproc.hpp"
#include "../utils/var_bool.hpp"
......@@ -64,7 +65,14 @@ void CmdPlaylistRepeat::execute()
void CmdPlaylistLoad::execute()
{
playlist_Import( getPL(), m_file.c_str() );
char* psz_path = vlc_uri2path( m_file.c_str() );
if ( !psz_path )
{
msg_Err(getIntf(),"unable to load playlist %s", m_file.c_str() );
return;
}
playlist_Import( getPL(), psz_path );
free( psz_path );
}
......
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