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[] = ...@@ -722,6 +722,12 @@ static char *ppsz_clock_descriptions[] =
"double-click on a file in the explorer. This option will allow you " \ "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.") "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_TEXT N_("Increase the priority of the process")
#define HPRIORITY_LONGTEXT N_( \ #define HPRIORITY_LONGTEXT N_( \
"Increasing the priority of the process will very likely improve your " \ "Increasing the priority of the process will very likely improve your " \
...@@ -1225,6 +1231,8 @@ vlc_module_begin(); ...@@ -1225,6 +1231,8 @@ vlc_module_begin();
#if defined(WIN32) #if defined(WIN32)
add_bool( "one-instance", 0, NULL, ONEINSTANCE_TEXT, add_bool( "one-instance", 0, NULL, ONEINSTANCE_TEXT,
ONEINSTANCE_LONGTEXT, VLC_TRUE ); ONEINSTANCE_LONGTEXT, VLC_TRUE );
add_bool( "playlist-enqueue", 0, NULL, ONEINSTANCE_TEXT,
ONEINSTANCE_LONGTEXT, VLC_TRUE );
add_bool( "high-priority", 0, NULL, HPRIORITY_TEXT, add_bool( "high-priority", 0, NULL, HPRIORITY_TEXT,
HPRIORITY_LONGTEXT, VLC_FALSE ); HPRIORITY_LONGTEXT, VLC_FALSE );
add_bool( "fast-mutex", 0, NULL, FAST_MUTEX_TEXT, add_bool( "fast-mutex", 0, NULL, FAST_MUTEX_TEXT,
......
...@@ -326,12 +326,20 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam, ...@@ -326,12 +326,20 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
{ {
i_options++; i_options++;
} }
if( i_opt || config_GetInt( p_this, "playlist-enqueue" ) )
playlist_AddExt( p_playlist, ppsz_argv[i_opt],ppsz_argv[i_opt], {
PLAYLIST_APPEND | (i_opt? 0 : PLAYLIST_GO), 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, PLAYLIST_END, -1,
(char const **)( i_options ? &ppsz_argv[i_opt+1] : NULL ), (char const **)( i_options ? &ppsz_argv[i_opt+1] : NULL ),
i_options ); i_options );
}
i_opt += 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