Commit ff007ad1 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: playlist enqueue, use the Open:: helper

parent c4d2180d
...@@ -941,16 +941,10 @@ bool PLModel::action( QAction *action, const QModelIndexList &indexes ) ...@@ -941,16 +941,10 @@ bool PLModel::action( QAction *action, const QModelIndexList &indexes )
case ACTION_ENQUEUEDIR: case ACTION_ENQUEUEDIR:
if( a.uris.isEmpty() ) break; if( a.uris.isEmpty() ) break;
p_input = input_item_New( a.uris.first().toLatin1().constData(), NULL );
if( unlikely( p_input == NULL ) ) break; Open::openMRL( p_intf, a.uris.first().toLatin1().constData(),
false, getPLRootType() == ROOTTYPE_CURRENT_PLAYING );
/* FIXME: playlist_AddInput() can fail */
playlist_AddInput( THEPL, p_input,
PLAYLIST_APPEND,
PLAYLIST_END,
getPLRootType() == ROOTTYPE_CURRENT_PLAYING,
pl_Unlocked );
vlc_gc_decref( p_input );
return true; return true;
case ACTION_ENQUEUEGENERIC: case ACTION_ENQUEUEGENERIC:
...@@ -966,11 +960,7 @@ bool PLModel::action( QAction *action, const QModelIndexList &indexes ) ...@@ -966,11 +960,7 @@ bool PLModel::action( QAction *action, const QModelIndexList &indexes )
VLC_INPUT_OPTION_TRUSTED ); VLC_INPUT_OPTION_TRUSTED );
} }
/* FIXME: playlist_AddInput() can fail */ Open::openInput( p_intf, p_input, uri, false );
playlist_AddInput( THEPL, p_input,
PLAYLIST_APPEND | PLAYLIST_PREPARSE,
PLAYLIST_END, true, pl_Unlocked );
vlc_gc_decref( p_input );
} }
return true; return true;
......
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