Commit e5ad757d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

playlist: use boolean for playlist_AddExt() mode parameter

parent 420f50cc
......@@ -362,7 +362,7 @@ VLC_API int playlist_ServicesDiscoveryControl( playlist_t *, const char *, int,
/******************** Item addition ********************/
VLC_API int playlist_Add( playlist_t *, const char *, bool );
VLC_API int playlist_AddExt( playlist_t *, const char *, const char *, int, int, const char *const *, unsigned, bool );
VLC_API int playlist_AddExt( playlist_t *, const char *, const char *, bool, int, const char *const *, unsigned, bool );
VLC_API int playlist_AddInput( playlist_t *, input_item_t *, int, bool );
VLC_API playlist_item_t * playlist_NodeAddInput( playlist_t *, input_item_t *, playlist_item_t *, int, int );
VLC_API int playlist_NodeAddCopy( playlist_t *, playlist_item_t *, playlist_item_t *, int );
......
......@@ -100,8 +100,7 @@ static LRESULT CALLBACK WMCOPYWNDPROC(HWND hwnd, UINT uMsg,
psz_URI = vlc_path2uri( ppsz_argv[i_opt], NULL );
playlist_AddExt( pl_Get(intf),
(psz_URI != NULL) ? psz_URI : ppsz_argv[i_opt],
NULL,
( ( i_opt || p_data->enqueue ) ? 0 : PLAYLIST_GO ),
NULL, (i_opt == 0 && !p_data->enqueue),
i_options,
(char const **)( i_options ? &ppsz_argv[i_opt+1] : NULL ),
VLC_INPUT_OPTION_TRUSTED,
......
......@@ -212,9 +212,7 @@ int Open::openMRLwithOptions( intf_thread_t* p_intf,
}
/* Add to playlist */
int i_ret = playlist_AddExt( THEPL,
qtu(mrl), title,
(b_start ? PLAYLIST_GO : 0),
int i_ret = playlist_AddExt( THEPL, qtu(mrl), title, b_start,
i_options, ppsz_options, VLC_INPUT_OPTION_TRUSTED,
b_playlist );
......
......@@ -98,8 +98,7 @@ static void IPCHelperThread( void *arg )
if( p_playlist )
{
playlist_AddExt( p_playlist, ppsz_argv[ i_opt ], NULL,
(( i_opt || ulCmd == IPC_CMD_ENQUEUE ) ?
0 : PLAYLIST_GO ),
((i_opt == 0 && ulCmd != IPC_CMD_ENQUEUE ),
i_options,
( char const ** )
( i_options ? &ppsz_argv[ i_opt + 1 ] :
......
......@@ -433,8 +433,8 @@ void playlist_Clear( playlist_t * p_playlist, bool b_locked )
*/
int playlist_Add( playlist_t *p_playlist, const char *psz_uri, bool play_now )
{
return playlist_AddExt( p_playlist, psz_uri, NULL,
play_now ? PLAYLIST_GO : 0, 0, NULL, 0, true );
return playlist_AddExt( p_playlist, psz_uri, NULL, play_now,
0, NULL, 0, true );
}
/**
......@@ -443,7 +443,7 @@ int playlist_Add( playlist_t *p_playlist, const char *psz_uri, bool play_now )
* \param p_playlist the playlist to add into
* \param psz_uri the mrl to add to the playlist
* \param psz_name a text giving a name or description of this item
* \param i_mode the mode used when adding
* \param play_now whether to start playing immediately or not
* \param i_options the number of options
* \param ppsz_options an array of options
* \param i_option_flags options flags
......@@ -451,7 +451,7 @@ int playlist_Add( playlist_t *p_playlist, const char *psz_uri, bool play_now )
* \return VLC_SUCCESS or a VLC error code
*/
int playlist_AddExt( playlist_t *p_playlist, const char * psz_uri,
const char *psz_name, int i_mode,
const char *psz_name, bool play_now,
int i_options, const char *const *ppsz_options,
unsigned i_option_flags,
bool b_playlist )
......@@ -463,7 +463,8 @@ int playlist_AddExt( playlist_t *p_playlist, const char * psz_uri,
if( p_input == NULL )
return VLC_ENOMEM;
input_item_AddOptions( p_input, i_options, ppsz_options, i_option_flags );
i_ret = playlist_AddInput( p_playlist, p_input, i_mode, b_playlist );
i_ret = playlist_AddInput( p_playlist, p_input,
play_now ? PLAYLIST_GO : 0, b_playlist );
input_item_Release( p_input );
return i_ret;
}
......
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