playlist: do create play-and-exit variable
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 7 Oct 2013 15:20:34 +0000 (18:20 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 7 Oct 2013 15:21:14 +0000 (18:21 +0300)
(as with play-and-stop)

src/playlist/engine.c
src/playlist/thread.c

index 0873a97..8207c79 100644 (file)
@@ -483,7 +483,6 @@ static void VariablesInit( playlist_t *p_playlist )
 
     /* Variables to control playback */
     var_Create( p_playlist, "playlist-autostart", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
-    var_Create( p_playlist, "play-and-exit", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
     var_Create( p_playlist, "random", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
     var_AddCallback( p_playlist, "random", RandomCallback, NULL );
     var_Create( p_playlist, "repeat", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
index e86362f..594fb6b 100644 (file)
@@ -510,7 +510,7 @@ static void LoopRequest( playlist_t *p_playlist, int i_status )
     msg_Dbg( p_playlist, "nothing to play" );
     p_sys->status.i_status = PLAYLIST_STOPPED;
 
-    if( var_GetBool( p_playlist, "play-and-exit" ) )
+    if( var_InheritBool( p_playlist, "play-and-exit" ) )
     {
         msg_Info( p_playlist, "end of playlist, exiting" );
         libvlc_Quit( p_playlist->p_libvlc );