Commit 3b4e4faa authored by Clément Stenac's avatar Clément Stenac

Don't autoplay SAP items

parent 9ceef3c7
......@@ -362,7 +362,7 @@ bool Instance::OnInit()
FIND_ANYWHERE );
if( p_playlist )
{
playlist_Play( p_playlist );
playlist_LockControl( p_playlist, PLAYLIST_AUTOPLAY );
vlc_object_release( p_playlist );
}
}
......
......@@ -346,6 +346,7 @@ static int Open( vlc_object_t *p_this )
p_sys->p_node = playlist_NodeCreate( p_playlist, VIEW_CATEGORY,
_("SAP"), p_view->p_root );
p_sys->p_node->i_flags |= PLAYLIST_RO_FLAG;
p_sys->p_node->i_flags =~ PLAYLIST_SKIP_FLAG;
val.b_bool = VLC_TRUE;
var_Set( p_playlist, "intf-change", val );
......@@ -858,8 +859,11 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
psz_grp );
if( p_child == NULL )
{
p_child = playlist_NodeCreate( p_playlist, VIEW_CATEGORY,
psz_grp, p_sd->p_sys->p_node );
p_child->i_flags =~ PLAYLIST_SKIP_FLAG;
}
free( psz_grp );
}
else
......
......@@ -794,7 +794,7 @@ static playlist_item_t * NextItem( playlist_t *p_playlist )
}
if( !p_playlist->request.b_request && p_playlist->status.p_item &&
!(p_playlist->status.p_item->i_flags & PLAYLIST_SKIP_FLAG) )
!( p_playlist->status.p_item->i_flags & PLAYLIST_SKIP_FLAG ) )
{
msg_Dbg( p_playlist, "no-skip mode, stopping") ;
return NULL;
......@@ -947,7 +947,7 @@ static playlist_item_t * NextItem( playlist_t *p_playlist )
{
p_playlist->i_index++;
p_new = p_playlist->pp_items[p_playlist->i_index];
if( !(p_new->i_flags & PLAYLIST_SKIP_FLAG) )
if( !( p_new->i_flags & PLAYLIST_SKIP_FLAG ) )
{
return NULL;
}
......@@ -988,6 +988,8 @@ static playlist_item_t * NextItem( playlist_t *p_playlist )
p_playlist->status.p_node,
NULL );
}
if( p_new != NULL && !(p_new->i_flags & PLAYLIST_SKIP_FLAG) )
return NULL;
}
}
}
......
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