Commit 1c57da26 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

skins2: use playlist_ViewPlay() instead of PLAYLIST_GO

parent f7770d42
......@@ -271,7 +271,7 @@ void Playtree::onUpdateSlider()
void Playtree::insertItems( VarTree& elem, const std::list<std::string>& files, bool start )
{
bool first = true;
bool first = start;
VarTree* p_elem = &elem;
playlist_item_t* p_node = NULL;
int i_pos = -1;
......@@ -319,9 +319,10 @@ void Playtree::insertItems( VarTree& elem, const std::list<std::string>& files,
goto fin;
for( std::list<std::string>::const_iterator it = files.begin();
it != files.end(); ++it, i_pos++, first = false )
it != files.end(); ++it, i_pos++ )
{
input_item_t *pItem;
playlist_item_t *pPlItem;
if( strstr( it->c_str(), "://" ) )
pItem = input_item_New( it->c_str(), NULL );
......@@ -337,12 +338,13 @@ void Playtree::insertItems( VarTree& elem, const std::list<std::string>& files,
if( pItem == NULL)
continue;
int i_mode = 0;
if( first && start )
i_mode |= PLAYLIST_GO;
pPlItem = playlist_NodeAddInput( m_pPlaylist, pItem, p_node, 0, i_pos );
playlist_NodeAddInput( m_pPlaylist, pItem, p_node,
i_mode, i_pos );
if( likely(pPlItem != NULL) && first )
{
first = false;
playlist_ViewPlay( m_pPlaylist, NULL, pPlItem );
}
}
fin:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment