Commit e86e468b authored by Antoine Cellerier's avatar Antoine Cellerier

* add --playlist-enqueue option ( win32 only )

When running with --one-instance, enqueue item to playlist and keep playing
the current item. (default behavior is to start playing new item)
parent de6dd45b
......@@ -722,6 +722,12 @@ static char *ppsz_clock_descriptions[] =
"double-click on a file in the explorer. This option will allow you " \
"to play the file with the already running instance or enqueue it.")
#define PLAYLISTENQUEUE_TEXT N_( \
"Enqueue items to playlist when in one instance mode")
#define PLAYLISTENQUEUE_LONGTEXT N_( \
"When using the one instance only option, enqueue items to playlist " \
"and keep playing current item.")
#define HPRIORITY_TEXT N_("Increase the priority of the process")
#define HPRIORITY_LONGTEXT N_( \
"Increasing the priority of the process will very likely improve your " \
......@@ -1225,6 +1231,8 @@ vlc_module_begin();
#if defined(WIN32)
add_bool( "one-instance", 0, NULL, ONEINSTANCE_TEXT,
ONEINSTANCE_LONGTEXT, VLC_TRUE );
add_bool( "playlist-enqueue", 0, NULL, ONEINSTANCE_TEXT,
ONEINSTANCE_LONGTEXT, VLC_TRUE );
add_bool( "high-priority", 0, NULL, HPRIORITY_TEXT,
HPRIORITY_LONGTEXT, VLC_FALSE );
add_bool( "fast-mutex", 0, NULL, FAST_MUTEX_TEXT,
......
......@@ -326,12 +326,20 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
{
i_options++;
}
playlist_AddExt( p_playlist, ppsz_argv[i_opt],ppsz_argv[i_opt],
PLAYLIST_APPEND | (i_opt? 0 : PLAYLIST_GO),
if( i_opt || config_GetInt( p_this, "playlist-enqueue" ) )
{
playlist_AddExt( p_playlist, ppsz_argv[i_opt],
ppsz_argv[i_opt], PLAYLIST_APPEND ,
PLAYLIST_END, -1,
(char const **)( i_options ? &ppsz_argv[i_opt+1] : NULL ),
i_options );
} else {
playlist_AddExt( p_playlist, ppsz_argv[i_opt],
ppsz_argv[i_opt], PLAYLIST_APPEND | PLAYLIST_GO,
PLAYLIST_END, -1,
(char const **)( i_options ? &ppsz_argv[i_opt+1] : NULL ),
i_options );
}
i_opt += i_options;
}
......
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