+ for( i_item = 0; i_item < (int)[o_array count]; i_item++ )
+ {
+ input_item_t *p_input;
+ NSDictionary *o_one_item;
+
+ /* Get the item */
+ o_one_item = [o_array objectAtIndex: i_item];
+ p_input = [self createItem: o_one_item];
+
+ if( !p_input ) continue;
+
+ /* Add the item */
+ /* FIXME: playlist_BothAddInput() can fail */
+ PL_LOCK;
+ playlist_BothAddInput( p_playlist, p_input, p_node,
+ PLAYLIST_INSERT,
+ i_position == -1 ?
+ PLAYLIST_END : i_position + i_item,
+ NULL, NULL, pl_Locked );
+
+
+ if( i_item == 0 && !b_enqueue )
+ {
+ playlist_item_t *p_item;
+ p_item = playlist_ItemGetByInput( p_playlist, p_input, pl_Locked );
+ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Locked, NULL, p_item );
+ }
+ PL_UNLOCK;
+ vlc_gc_decref( p_input );
+ }
+ [self playlistUpdated];
+ vlc_object_release( p_playlist );
+}
+
+- (NSMutableArray *)subSearchItem:(playlist_item_t *)p_item
+{
+ playlist_t *p_playlist = pl_Yield( VLCIntf );
+ playlist_item_t *p_selected_item;
+ int i_current, i_selected_row;
+
+ i_selected_row = [o_outline_view selectedRow];
+ if (i_selected_row < 0)
+ i_selected_row = 0;
+
+ p_selected_item = (playlist_item_t *)[[o_outline_view itemAtRow:
+ i_selected_row] pointerValue];
+
+ for( i_current = 0; i_current < p_item->i_children ; i_current++ )
+ {
+ char *psz_temp;
+ NSString *o_current_name, *o_current_author;
+
+ PL_LOCK;
+ o_current_name = [NSString stringWithUTF8String:
+ p_item->pp_children[i_current]->p_input->psz_name];
+ psz_temp = input_ItemGetInfo( p_item->p_input ,
+ _("Meta-information"),_("Artist") );
+ o_current_author = [NSString stringWithUTF8String: psz_temp];
+ free( psz_temp);
+ PL_UNLOCK;
+
+ if( p_selected_item == p_item->pp_children[i_current] &&
+ b_selected_item_met == NO )
+ {
+ b_selected_item_met = YES;
+ }
+ else if( p_selected_item == p_item->pp_children[i_current] &&
+ b_selected_item_met == YES )