Changeset 086939730f60d6ffe9155ec1621883f246bdf31f

Show
Ignore:
Timestamp:
24/08/08 14:09:06 (3 months ago)
Author:
Derk-Jan Hartman <hartman@videolan.org>
git-committer:
Derk-Jan Hartman <hartman@videolan.org> 1219579746 +0200
git-parent:

[2098113d3fc5819145c906e857e053e2bdfc3942]

git-author:
Derk-Jan Hartman <hartman@videolan.org> 1219579746 +0200
Message:

macosx: set the correct node when we add items and play them at once.

This fixes #1807
For Mac OS X that is. We might want to consider changing the default behaviour of playlist_Control( PLAYLIST_VIEWPLAY )

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/macosx/playlist.m

    r20e0e10 r0869397  
    10321032        if( i_item == 0 && !b_enqueue ) 
    10331033        { 
    1034             playlist_item_t *p_item; 
     1034            playlist_item_t *p_item = NULL; 
     1035            playlist_item_t *p_node = NULL; 
    10351036            p_item = playlist_ItemGetByInput( p_playlist, p_input, pl_Locked ); 
    1036             playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Locked, NULL, p_item ); 
     1037            if( p_item ) 
     1038            { 
     1039                if( p_item->i_children == -1 ) 
     1040                    p_node = p_item->p_parent; 
     1041                else 
     1042                { 
     1043                    p_node = p_item; 
     1044                    if( p_node->i_children > 0 && p_node->pp_children[0]->i_children == -1 ) 
     1045                        p_item = p_node->pp_children[0]; 
     1046                    else 
     1047                        p_item = NULL; 
     1048                } 
     1049                playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Locked, p_node, p_item ); 
     1050            } 
    10371051        } 
    10381052        vlc_gc_decref( p_input ); 
     
    10741088            playlist_item_t *p_item; 
    10751089            p_item = playlist_ItemGetByInput( p_playlist, p_input, pl_Locked ); 
    1076             playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Locked, NULL, p_item ); 
     1090            playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Locked, p_node, p_item ); 
    10771091        } 
    10781092        PL_UNLOCK;