playlist_t *p_playlist = pl_Hold( p_this );
// Make sure the item is deleted afterwards
/// \bug does not always work
- p_playlist->status.p_item->i_flags |= PLAYLIST_REMOVE_FLAG;
+ playlist_CurrentPlayingItem( p_playlist )->i_flags |= PLAYLIST_REMOVE_FLAG;
vlc_object_release( p_playlist );
vlc_value_t val;
// Update the input
if( getIntf()->p_sys->p_input == NULL )
{
- getIntf()->p_sys->p_input = getIntf()->p_sys->p_playlist->p_input;
+ getIntf()->p_sys->p_input =
+ playlist_CurrentInput( getIntf()->p_sys->p_playlist );
if( getIntf()->p_sys->p_input )
vlc_object_hold( getIntf()->p_sys->p_input );
}
void VlcProc::updateStreamName( playlist_t *p_playlist )
{
- if( p_playlist && p_playlist->p_input )
+ if( p_playlist && playlist_CurrentInput( p_playlist ))
{
// Get playlist item information
- input_item_t *pItem = input_GetItem(p_playlist->p_input);
+ input_item_t *pItem = input_GetItem(playlist_CurrentInput( p_playlist));
VarText &rStreamName = getStreamNameVar();
VarText &rStreamURI = getStreamURIVar();
playlist_item_t* pNode = (playlist_item_t*)(it->m_pData);
UString *pName = new UString( getIntf(), pNode->p_input->psz_name );
it->m_cString = UStringPtr( pName );
- it->m_playing = m_pPlaylist->status.p_item == pNode;
+ it->m_playing = playlist_CurrentPlayingItem( m_pPlaylist ) == pNode;
if( it->m_playing ) descr.b_active_item = true;
}
else
pNode->pp_children[i]->p_input->psz_name );
rTree.add( pNode->pp_children[i]->i_id, UStringPtr( pName ),
false,
- m_pPlaylist->status.p_item == pNode->pp_children[i],
+ playlist_CurrentPlayingItem(m_pPlaylist) == pNode->pp_children[i],
false, pNode->pp_children[i]->i_flags & PLAYLIST_RO_FLAG,
pNode->pp_children[i] );
if( pNode->pp_children[i]->i_children )