- if( !b_locked ) PL_LOCK;
-
- /* Add to ONELEVEL */
- p_item_one = playlist_ItemNewFromInput( p_playlist, p_input );
- if( p_item_one == NULL ) return VLC_ENOMEM;
- AddItem( p_playlist, p_item_one,
- b_playlist ? p_playlist->p_local_onelevel :
- p_playlist->p_ml_onelevel , i_mode, i_pos );
-
- /* Add to CATEGORY */
- p_item_cat = playlist_ItemNewFromInput( p_playlist, p_input );
- if( p_item_cat == NULL ) return VLC_ENOMEM;
- AddItem( p_playlist, p_item_cat,
- b_playlist ? p_playlist->p_local_category :
- p_playlist->p_ml_category , i_mode, i_pos );
-
- GoAndPreparse( p_playlist, i_mode, p_item_cat, p_item_one );
-
- if( !b_locked ) PL_UNLOCK;
- return VLC_SUCCESS;
-}
-
-/**
- * Add input
- *
- * Add an input item to p_direct_parent in the category tree, and to the
- * matching top category in onelevel
- * \param p_playlist the playlist to add into
- * \param p_input the input item to add
- * \param p_direct_parent the parent item to add into
- * \param i_mode the mode used when adding
- * \param i_pos the position in the playlist where to add. If this is
- * PLAYLIST_END the item will be added at the end of the playlist
- * regardless of its size
- * \param i_cat id of the items category
- * \param i_one id of the item onelevel category
- * \param b_locked TRUE if the playlist is locked
- * \return VLC_SUCCESS if success, VLC_EGENERIC if fail, VLC_ENOMEM if OOM
- */
-int playlist_BothAddInput( playlist_t *p_playlist,
- input_item_t *p_input,
- playlist_item_t *p_direct_parent,
- int i_mode, int i_pos,
- int *i_cat, int *i_one, bool b_locked )
-{
- playlist_item_t *p_item_cat, *p_item_one, *p_up;
- int i_top;
- assert( p_input );
- if( p_playlist->b_die ) return VLC_EGENERIC;
- if( !b_locked ) PL_LOCK;
-
- /* Add to category */
- p_item_cat = playlist_ItemNewFromInput( p_playlist, p_input );
- if( p_item_cat == NULL ) return VLC_ENOMEM;
- AddItem( p_playlist, p_item_cat, p_direct_parent, i_mode, i_pos );
-
- /* Add to onelevel */
- /**Â \todo make a faster case for ml import */
- p_item_one = playlist_ItemNewFromInput( p_playlist, p_input );
- if( p_item_one == NULL ) return VLC_ENOMEM;