]> git.sesse.net Git - vlc/commitdiff
Fix playlist behaviour with delete in HTTP intf (Closes #105)
authorClément Stenac <zorglub@videolan.org>
Tue, 10 May 2005 21:19:08 +0000 (21:19 +0000)
committerClément Stenac <zorglub@videolan.org>
Tue, 10 May 2005 21:19:08 +0000 (21:19 +0000)
src/playlist/item-ext.c

index acfe2ca3086505c3f88aa146b16eb30114ae1b95..f2087be59b7acb631b10bd6698f528d83ca4c079 100644 (file)
@@ -630,6 +630,11 @@ int playlist_Delete( playlist_t * p_playlist, int i_id )
     {
         return VLC_EGENERIC;
     }
+    if( p_item->i_children > -1 )
+    {
+        return playlist_NodeDelete( p_playlist, p_item, VLC_TRUE, VLC_FALSE );
+    }
+
     var_SetInteger( p_playlist, "item-deleted", i_id );
 
     i_bottom = 0; i_top = p_playlist->i_all_size - 1;
@@ -658,7 +663,6 @@ int playlist_Delete( playlist_t * p_playlist, int i_id )
         /* Hack we don't call playlist_Control for lock reasons */
         p_playlist->status.i_status = PLAYLIST_STOPPED;
         p_playlist->request.b_request = VLC_TRUE;
-//        p_playlist->status.p_item = NULL;
         msg_Info( p_playlist, "stopping playback" );
         b_flag = VLC_TRUE;
     }