+
+/**
+ * Moves an item
+ *
+ * \param p_playlist the playlist
+ * \param p_item the item to move
+ * \param p_node the new parent of the item
+ * \param i_newpos the new position under this new parent
+ * \param i_view the view in which the move must be done or ALL_VIEWS
+ * \return VLC_SUCCESS or an error
+ */
+int playlist_TreeMove( playlist_t * p_playlist, playlist_item_t *p_item,
+ playlist_item_t *p_node, int i_newpos, int i_view )
+{
+ int i;
+ playlist_item_t *p_detach = NULL;
+#if 0
+ if( i_view == ALL_VIEWS )
+ {
+ for( i = 0 ; i < p_playlist->i_views; i++ )
+ {
+ playlist_TreeMove( p_playlist, p_item, p_node, i_newpos,
+ p_playlist->pp_views[i] );
+ }
+ }
+#endif
+
+ /* Find the parent */
+ for( i = 0 ; i< p_item->i_parents; i++ )
+ {
+ if( p_item->pp_parents[i]->i_view == i_view )
+ {
+ p_detach = p_item->pp_parents[i]->p_parent;
+ break;
+ }
+ }
+ if( p_detach == NULL )
+ {
+ msg_Err( p_playlist, "item not found in view %i", i_view );
+ return VLC_EGENERIC;
+ }
+
+ /* Detach from the parent */
+// playlist_NodeDetach( p_detach, p_item );
+
+ /* Attach to new parent */
+
+ return VLC_SUCCESS;
+}