Commit 10232c2d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

playlist: remove the skip flag

parent 9c77c044
......@@ -136,7 +136,6 @@ struct playlist_item_t
};
typedef enum {
PLAYLIST_SKIP_FLAG = 0x0002, /**< Must playlist skip after it ? */
PLAYLIST_DBL_FLAG = 0x0004, /**< Is it disabled ? */
PLAYLIST_RO_FLAG = 0x0008, /**< Write-enabled ? */
PLAYLIST_SUBITEM_STOP_FLAG = 0x0040, /**< Must playlist stop if the item gets subitems ?*/
......
......@@ -233,7 +233,6 @@ static void push_playlist_item( lua_State *L, playlist_item_t *p_item )
lua_pushboolean( L, 1 ); \
lua_setfield( L, -2, #label ); \
}
CHECK_AND_SET_FLAG( SKIP, skip )
CHECK_AND_SET_FLAG( DBL, disabled )
CHECK_AND_SET_FLAG( RO, ro )
#undef CHECK_AND_SET_FLAG
......
......@@ -285,7 +285,6 @@ playlist.get( [what, [tree]] ): Get the playlist.
.id: The item's id.
.flags: a table with the following members if the corresponding flag is
set:
.skip
.disabled
.ro
.name:
......
......@@ -55,8 +55,7 @@ static void playlist_sd_item_added(services_discovery_t *sd,
playlist_Lock(playlist);
if (sds->node == NULL)
sds->node = playlist_NodeCreate(playlist, longname, &playlist->root,
PLAYLIST_END,
PLAYLIST_RO_FLAG|PLAYLIST_SKIP_FLAG);
PLAYLIST_END, PLAYLIST_RO_FLAG);
if (parent != NULL)
node = playlist_ItemGetByInput(playlist, parent);
......@@ -138,7 +137,7 @@ int playlist_ServicesDiscoveryAdd(playlist_t *playlist, const char *chain)
if (sds->node == NULL && sds->sd->description != NULL)
sds->node = playlist_NodeCreate(playlist, sds->sd->description,
&playlist->root, PLAYLIST_END,
PLAYLIST_RO_FLAG|PLAYLIST_SKIP_FLAG);
PLAYLIST_RO_FLAG);
TAB_APPEND(pl_priv(playlist)->i_sds, pl_priv(playlist)->pp_sds, sds);
playlist_Unlock(playlist);
......
......@@ -380,27 +380,10 @@ static playlist_item_t *NextItem( playlist_t *p_playlist )
}
/* */
if( get_current_status_item( p_playlist ) )
{
playlist_item_t *p_parent = get_current_status_item( p_playlist );
while( p_parent )
{
if( p_parent->i_flags & PLAYLIST_SKIP_FLAG )
{
msg_Dbg( p_playlist, "blocking item, stopping") ;
return NULL;
}
p_parent = p_parent->p_parent;
}
}
PL_DEBUG( "changing item without a request (current %i/%i)",
p_playlist->i_current_index, p_playlist->current.i_size );
/* Can't go to next from current item */
if( get_current_status_item( p_playlist ) &&
get_current_status_item( p_playlist )->i_flags & PLAYLIST_SKIP_FLAG )
return NULL;
if( p_sys->b_reset_currently_playing )
ResetCurrentlyPlaying( p_playlist,
get_current_status_item( p_playlist ) );
......@@ -424,9 +407,6 @@ static playlist_item_t *NextItem( playlist_t *p_playlist )
return NULL;
p_new = ARRAY_VAL( p_playlist->current, p_playlist->i_current_index );
/* The new item can't be autoselected */
if( p_new != NULL && p_new->i_flags & PLAYLIST_SKIP_FLAG )
return NULL;
}
return p_new;
}
......
......@@ -163,7 +163,7 @@ int playlist_NodeInsert( playlist_item_t *p_parent, playlist_item_t *p_item,
/* Inherit special flags from parent (sd cases) */
if( ( p_parent->i_flags & PLAYLIST_NO_INHERIT_FLAG ) == 0 )
p_item->i_flags |= (p_parent->i_flags & (PLAYLIST_RO_FLAG | PLAYLIST_SKIP_FLAG));
p_item->i_flags |= (p_parent->i_flags & PLAYLIST_RO_FLAG);
return VLC_SUCCESS;
}
......
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