Changeset 5a989669c617078efd638d0a4edd3d51d929a349

Show
Ignore:
Timestamp:
19/11/06 17:12:43 (2 years ago)
Author:
Clément Stenac <zorglub@videolan.org>
git-committer:
Clément Stenac <zorglub@videolan.org> 1163952763 +0000
git-parent:

[9fa2642c44cc79793530eda5ab44c03c6ab47d46]

git-author:
Clément Stenac <zorglub@videolan.org> 1163952763 +0000
Message:

Input options inheritance in directory access (Closes:#353)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/directory.c

    r0900f11 r5a98966  
    126126 
    127127static int ReadDir( playlist_t *, const char *psz_name, int i_mode, 
    128                     playlist_item_t *, playlist_item_t * ); 
     128                    playlist_item_t *, playlist_item_t *, input_item_t * ); 
    129129 
    130130/***************************************************************************** 
     
    185185    input_item_t       *p_current_input = ( (input_thread_t*)p_access->p_parent) 
    186186                                                       ->input.p_item; 
    187     playlist_item_t    *p_current = 
    188                     playlist_ItemGetByInput( p_playlist, p_current_input, VLC_FALSE ); 
     187    playlist_item_t    *p_current = playlist_ItemGetByInput( p_playlist, 
     188                                                             p_current_input, 
     189                                                             VLC_FALSE ); 
    189190    char               *psz_name = strdup (p_access->psz_path); 
    190191 
     
    222223 
    223224    p_current->p_input->i_type = ITEM_TYPE_DIRECTORY; 
    224     p_item_in_category = playlist_ItemToNode( p_playlist, p_current, VLC_FALSE ); 
     225    p_item_in_category = playlist_ItemToNode( p_playlist, p_current, 
     226                                              VLC_FALSE ); 
    225227 
    226228    i_activity = var_GetInteger( p_playlist, "activity" ); 
     
    228230                    DIRECTORY_ACTIVITY ); 
    229231 
    230     ReadDir( p_playlist, psz_name, i_mode, p_current, p_item_in_category ); 
     232    ReadDir( p_playlist, psz_name, i_mode, p_current, p_item_in_category, 
     233             p_current_input ); 
    231234 
    232235    i_activity = var_GetInteger( p_playlist, "activity" ); 
     
    330333static int ReadDir( playlist_t *p_playlist, const char *psz_name, 
    331334                    int i_mode, playlist_item_t *p_parent, 
    332                     playlist_item_t *p_parent_category ) 
     335                    playlist_item_t *p_parent_category, 
     336                    input_item_t *p_current_input ) 
    333337{ 
    334338    char **pp_dir_content = NULL; 
     
    435439                     * Else, we still don't have  */ 
    436440                    if( ReadDir( p_playlist, psz_uri , MODE_EXPAND, 
    437                                  p_node, p_parent_category ? p_node : NULL ) 
     441                                 p_node, p_parent_category ? p_node : NULL, 
     442                                 p_current_input ) 
    438443                          != VLC_SUCCESS ) 
    439444                    { 
     
    470475                                                 -1, ITEM_TYPE_VFILE ); 
    471476                if (p_input != NULL) 
     477                { 
     478                    if( p_current_input ) 
     479                        input_ItemCopyOptions( p_current_input, p_input ); 
    472480                    playlist_BothAddInput( p_playlist, p_input, 
    473481                                           p_parent_category, 
    474482                                           PLAYLIST_APPEND|PLAYLIST_PREPARSE, 
    475483                                           PLAYLIST_END, NULL, NULL ); 
     484                } 
    476485            } 
    477486        }