* Preamble
*****************************************************************************/
#include <vlc/vlc.h>
-#include <vlc/input.h>
-#include <vlc/intf.h>
+#include <vlc_demux.h>
#include "playlist.h"
int i_item = -1;
int i_new_item = 0;
int i_key_length;
+ input_item_t *p_input;
INIT_PLAYLIST_STUFF;
{
p_input = input_ItemNewExt( p_playlist, psz_mrl, psz_name,
0, NULL, -1 );
- vlc_input_item_CopyOptions( p_current->p_input, p_input );
- playlist_AddWhereverNeeded( p_playlist, p_input, p_current,
- p_item_in_category, (i_parent_id > 0 ) ?
- VLC_TRUE: VLC_FALSE, PLAYLIST_APPEND );
+ input_ItemCopyOptions( p_current->p_input, p_input );
+ playlist_BothAddInput( p_playlist, p_input, p_item_in_category,
+ PLAYLIST_APPEND | PLAYLIST_SPREPARSE,
+ PLAYLIST_END, NULL, NULL );
}
else
{
if( psz_mrl )
{
p_input = input_ItemNewExt( p_playlist, psz_mrl, psz_name,0, NULL, -1 );
- vlc_input_item_CopyOptions( p_current->p_input, p_input );
- playlist_AddWhereverNeeded( p_playlist, p_input, p_current,
- p_item_in_category, (i_parent_id > 0 ) ?
- VLC_TRUE: VLC_FALSE, PLAYLIST_APPEND );
+ input_ItemCopyOptions( p_current->p_input, p_input );
+ playlist_BothAddInput( p_playlist, p_input, p_item_in_category,
+ PLAYLIST_APPEND | PLAYLIST_SPREPARSE,
+ PLAYLIST_END, NULL, NULL );
free( psz_mrl_orig );
psz_mrl = NULL;
}
}
HANDLE_PLAY_AND_RELEASE;
- return VLC_SUCCESS;
+ return -1; /* Needed for correct operation of go back */
}
static int Control( demux_t *p_demux, int i_query, va_list args )