- playlist_AddExt( p_playlist, *ppsz_uri, *ppsz_name,
- PLAYLIST_INSERT, *pi_position,
- -1, (const char **)*pppsz_options, *pi_options );
+ playlist_item_t *p_item =
+ playlist_ItemNew( p_playlist, *ppsz_uri, *ppsz_name );
+ int i;
+
+ for( i = 0; i < *pi_options; i++ )
+ {
+ playlist_ItemAddOption( p_item, *pppsz_options[i] );
+ }
+
+ playlist_NodeAddItem( p_playlist, p_item,
+ p_parent->pp_parents[0]->i_view,
+ p_parent, PLAYLIST_APPEND, PLAYLIST_END );
+
+ /* We need to declare the parents of the node as the
+ * same of the parent's ones */
+ playlist_CopyParents( p_parent, p_item );
+
+ vlc_input_item_CopyOptions( &p_parent->input, &p_item->input );