static int ReadDir( playlist_t *, const char *psz_name, int i_mode,
- playlist_item_t *, playlist_item_t * );
+ playlist_item_t *, playlist_item_t *, input_item_t * );
/*****************************************************************************
* Open: open the directory
playlist_item_t *p_item_in_category;
input_item_t *p_current_input = ( (input_thread_t*)p_access->p_parent)
->input.p_item;
- playlist_item_t *p_current =
- playlist_ItemGetByInput( p_playlist, p_current_input, VLC_FALSE );
+ playlist_item_t *p_current = playlist_ItemGetByInput( p_playlist,
+ p_current_input,
+ VLC_FALSE );
char *psz_name = strdup (p_access->psz_path);
if( psz_name == NULL )
msg_Dbg( p_access, "opening directory `%s'", p_access->psz_path );
p_current->p_input->i_type = ITEM_TYPE_DIRECTORY;
- p_item_in_category = playlist_ItemToNode( p_playlist, p_current, VLC_FALSE );
+ p_item_in_category = playlist_ItemToNode( p_playlist, p_current,
+ VLC_FALSE );
i_activity = var_GetInteger( p_playlist, "activity" );
var_SetInteger( p_playlist, "activity", i_activity +
DIRECTORY_ACTIVITY );
- ReadDir( p_playlist, psz_name, i_mode, p_current, p_item_in_category );
+ ReadDir( p_playlist, psz_name, i_mode, p_current, p_item_in_category,
+ p_current_input );
i_activity = var_GetInteger( p_playlist, "activity" );
var_SetInteger( p_playlist, "activity", i_activity -
*****************************************************************************/
static int ReadDir( playlist_t *p_playlist, const char *psz_name,
int i_mode, playlist_item_t *p_parent,
- playlist_item_t *p_parent_category )
+ playlist_item_t *p_parent_category,
+ input_item_t *p_current_input )
{
char **pp_dir_content = NULL;
int i_dir_content, i, i_return = VLC_SUCCESS;
/* If we had the parent in category, the it is now node.
* Else, we still don't have */
if( ReadDir( p_playlist, psz_uri , MODE_EXPAND,
- p_node, p_parent_category ? p_node : NULL )
+ p_node, p_parent_category ? p_node : NULL,
+ p_current_input )
!= VLC_SUCCESS )
{
i_return = VLC_EGENERIC;
psz_uri, entry, 0, NULL,
-1, ITEM_TYPE_VFILE );
if (p_input != NULL)
+ {
+ if( p_current_input )
+ input_ItemCopyOptions( p_current_input, p_input );
playlist_BothAddInput( p_playlist, p_input,
p_parent_category,
PLAYLIST_APPEND|PLAYLIST_PREPARSE,
PLAYLIST_END, NULL, NULL );
+ }
}
}
}