Commit 1df015be authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

playlist: b_tree is private.

parent 6bd606ac
......@@ -177,8 +177,6 @@ struct playlist_t
playlist_item_t * p_local_onelevel; /** < "Playlist" in ONELEVEL view */
playlist_item_t * p_ml_onelevel; /** < "Library" in ONELEVEL view */
bool b_tree; /**< Display as a tree */
bool b_doing_ml; /**< Doing media library stuff,
* get quicker */
bool b_auto_preparse;
......
......@@ -94,7 +94,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
p_playlist->b_reset_currently_playing = true;
p_playlist->last_rebuild_date = 0;
p_playlist->b_tree = var_CreateGetBool( p_playlist, "playlist-tree" );
pl_priv(p_playlist)->b_tree = var_CreateGetBool( p_playlist, "playlist-tree" );
p_playlist->b_doing_ml = false;
......
......@@ -101,6 +101,8 @@ typedef struct playlist_private_t
vlc_mutex_t lock; /**< Lock to protect request */
} request;
bool b_tree; /**< Display as a tree */
} playlist_private_t;
#define pl_priv( pl ) ((playlist_private_t *)(pl))
......
......@@ -336,7 +336,7 @@ playlist_item_t * playlist_GetPreferredNode( playlist_t *p_playlist,
int i;
if( p_node->p_parent == p_playlist->p_root_category )
{
if( p_playlist->b_tree || p_node->p_input->b_prefers_tree )
if( pl_priv(p_playlist)->b_tree || p_node->p_input->b_prefers_tree )
return p_node;
for( i = 0 ; i< p_playlist->p_root_onelevel->i_children; i++ )
{
......@@ -347,7 +347,7 @@ playlist_item_t * playlist_GetPreferredNode( playlist_t *p_playlist,
}
else if( p_node->p_parent == p_playlist->p_root_onelevel )
{
if( !p_playlist->b_tree || !p_node->p_input->b_prefers_tree )
if( !pl_priv(p_playlist)->b_tree || !p_node->p_input->b_prefers_tree )
return p_node;
for( i = 0 ; i< p_playlist->p_root_category->i_children; i++ )
{
......
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