demux_t *p_demux = (demux_t *)p_this;
uint8_t *p_peek;
CHECK_PEEK( p_peek, 8 );
-
+
if( POKE( p_peek, "#EXTM3U", 7 ) || POKE( p_peek, "RTSPtext", 8 ) ||
isExtension( p_demux, ".m3u" ) || isExtension( p_demux, ".vlc" ) ||
/* A .ram file can contain a single rtsp link */
}
else
return VLC_EGENERIC;
-
+
STANDARD_DEMUX_INIT_MSG( "found valid M3U playlist" );
p_demux->p_sys->psz_prefix = E_(FindPrefix)( p_demux );
0, NULL, -1 );
break;
}
- /* TODO FLAGS */
p_sys->p_node_cat = playlist_NodeAddInput( p_playlist, p_sys->p_input,
p_playlist->p_root_category,
PLAYLIST_APPEND, PLAYLIST_END );
p_sys->p_node_one = playlist_NodeAddInput( p_playlist, p_sys->p_input,
p_playlist->p_root_onelevel,
PLAYLIST_APPEND, PLAYLIST_END );
+ p_sys->p_node_cat->i_flags |= PLAYLIST_RO_FLAG;
+ p_sys->p_node_cat->i_flags |= PLAYLIST_SKIP_FLAG;
+ p_sys->p_node_one->i_flags |= PLAYLIST_RO_FLAG;
+ p_sys->p_node_one->i_flags |= PLAYLIST_SKIP_FLAG;
+ p_sys->p_node_one->p_input->i_id = p_sys->p_node_cat->p_input->i_id;
+
val.b_bool = VLC_TRUE;
var_Set( p_playlist, "intf-change", val );
p_root->pp_children[i]->p_input->i_id == i_input_id )
{
DeleteInner( p_playlist, p_root->pp_children[i], b_do_stop );
+ return VLC_SUCCESS;
}
else if( p_root->pp_children[i]->i_children >= 0 )
{
- return playlist_DeleteFromInput( p_playlist, i_input_id,
+ int i_ret = playlist_DeleteFromInput( p_playlist, i_input_id,
p_root->pp_children[i], b_do_stop );
+ if( i_ret == VLC_SUCCESS ) return VLC_SUCCESS;
}
}
- return -1;
+ return VLC_EGENERIC;
}
/** Remove a playlist item from the playlist, given its id */
*/
/* Fast track the media library, no time to loose */
- if( p_item == p_playlist->p_ml_category )
+ if( p_item == p_playlist->p_ml_category )
return p_item;
/** \todo First look if we don't already have it */
}
else
{
- playlist_DeleteFromInput( p_playlist, p_item->p_input->i_id,
+ playlist_DeleteFromInput( p_playlist, p_item_in_one->p_input->i_id,
p_playlist->p_root_onelevel, VLC_FALSE );
}
var_SetInteger( p_playlist, "item-change", p_item->p_input->i_id );
int i_id = p_item->i_id;
vlc_bool_t b_flag = VLC_FALSE;
- //fprintf( stderr, "Deleting item %i - %s\n", i_id,
- // p_item->p_input->psz_name );
-
if( p_item->i_children > -1 )
{
return playlist_NodeDelete( p_playlist, p_item, VLC_TRUE, VLC_FALSE );