- /* Create our playlist node */
- p_playlist = (playlist_t *)vlc_object_find( p_sd, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( !p_playlist )
- {
- msg_Warn( p_sd, "unable to find playlist, cancelling");
- return VLC_EGENERIC;
- }
-
- p_sys->p_node_cat = playlist_NodeCreate( p_playlist, _("Podcast"),
- p_playlist->p_root_category, 0 );
- p_sys->p_node_one = playlist_NodeCreate( p_playlist, _("Podcast"),
- p_playlist->p_root_onelevel, 0 );
- p_sys->p_node_one->p_input->i_id = p_sys->p_node_cat->p_input->i_id;
-
- p_sys->p_node_one->i_flags |= PLAYLIST_RO_FLAG;
- p_sys->p_node_cat->i_flags |= PLAYLIST_RO_FLAG;
- p_sys->p_node_one->i_flags |= PLAYLIST_SKIP_FLAG;
- p_sys->p_node_cat->i_flags |= PLAYLIST_SKIP_FLAG;
- p_sys->pp_input = malloc( p_sys->i_urls * sizeof( input_thread_t * ) );
- for( i = 0; i < p_sys->i_urls; i++ )
- {
- input_item_t *p_input;
- asprintf( &psz_buf, "%s", p_sys->ppsz_urls[i] );
- p_input = input_ItemNewExt( p_playlist, psz_buf,
- p_sys->ppsz_urls[i], 0, NULL, -1 );
- input_ItemAddOption( p_input, "demux=podcast" );
- p_item = playlist_NodeAddInput( p_playlist, p_input, p_sys->p_node_cat,
- PLAYLIST_APPEND, PLAYLIST_END );
- p_item = playlist_NodeAddInput( p_playlist, p_input, p_sys->p_node_one,
- PLAYLIST_APPEND, PLAYLIST_END );
- free( psz_buf );
- p_sys->pp_input[i] = input_CreateThread( p_playlist, p_input );
- }
-
- val.b_bool = VLC_TRUE;
- var_Set( p_playlist, "intf-change", val );
-
- vlc_object_release( p_playlist );