ncurses: now play items from the top parent node (unless playing a specific node)
authorRafaël Carré <funman@videolan.org>
Wed, 3 Oct 2007 22:53:04 +0000 (22:53 +0000)
committerRafaël Carré <funman@videolan.org>
Wed, 3 Oct 2007 22:53:04 +0000 (22:53 +0000)
modules/gui/ncurses.c

index f0d14b5..bd9825b 100644 (file)
@@ -582,11 +582,14 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
                 if( p_sys->pp_plist[p_sys->i_box_plidx]->p_item->i_children
                         == -1 )
                 {
-                    playlist_item_t *p_item =
+                    playlist_item_t *p_item, *p_parent;
+                    p_item = p_parent =
                             p_sys->pp_plist[p_sys->i_box_plidx]->p_item;
+
+                    while( p_parent->p_parent )
+                        p_parent = p_parent->p_parent;
                     playlist_Control( p_sys->p_playlist, PLAYLIST_VIEWPLAY,
-                                      VLC_TRUE, p_item->p_parent,
-                        p_sys->pp_plist[p_sys->i_box_plidx]->p_item );
+                                      VLC_TRUE, p_parent, p_item );
                 }
                 else
                 {