- playlist_Add( p_playlist, psz_uri, p_dir_content->d_name,
- PLAYLIST_INSERT, *pi_position );
- (*pi_position)++;
+ playlist_item_t *p_item = playlist_ItemNew( p_playlist,
+ psz_uri, p_dir_content->d_name );
+ fprintf(stderr,"STARTTTTt\n");
+ playlist_NodeAddItem( p_playlist,p_item,
+ p_parent->pp_parents[0]->i_view,
+ p_parent,
+ PLAYLIST_APPEND, PLAYLIST_END );
+ fprintf(stderr,"DONE\n");
+ /* We need to declare the parents of the node as the
+ * same of the parent's ones */
+ for( i= 1 ; i< p_parent->i_parents; i ++ )
+ {
+ playlist_ItemAddParent( p_item,
+ p_parent->pp_parents[i]->i_view,
+ p_parent );
+ }