Commit 11c77e08 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

playlist: b_doing_ml doing ml is private.

parent 1df015be
...@@ -177,8 +177,6 @@ struct playlist_t ...@@ -177,8 +177,6 @@ struct playlist_t
playlist_item_t * p_local_onelevel; /** < "Playlist" in ONELEVEL view */ playlist_item_t * p_local_onelevel; /** < "Playlist" in ONELEVEL view */
playlist_item_t * p_ml_onelevel; /** < "Library" in ONELEVEL view */ playlist_item_t * p_ml_onelevel; /** < "Library" in ONELEVEL view */
bool b_doing_ml; /**< Doing media library stuff,
* get quicker */
bool b_auto_preparse; bool b_auto_preparse;
/* Runtime */ /* Runtime */
......
...@@ -96,7 +96,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent ) ...@@ -96,7 +96,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
pl_priv(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; pl_priv(p_playlist)->b_doing_ml = false;
p_playlist->b_auto_preparse = p_playlist->b_auto_preparse =
var_CreateGetBool( p_playlist, "auto-preparse" ) ; var_CreateGetBool( p_playlist, "auto-preparse" ) ;
......
...@@ -415,7 +415,7 @@ int playlist_AddInput( playlist_t* p_playlist, input_item_t *p_input, ...@@ -415,7 +415,7 @@ int playlist_AddInput( playlist_t* p_playlist, input_item_t *p_input,
{ {
playlist_item_t *p_item_cat, *p_item_one; playlist_item_t *p_item_cat, *p_item_one;
if( p_playlist->b_die ) return VLC_EGENERIC; if( p_playlist->b_die ) return VLC_EGENERIC;
if( !p_playlist->b_doing_ml ) if( !pl_priv(p_playlist)->b_doing_ml )
PL_DEBUG( "adding item `%s' ( %s )", p_input->psz_name, PL_DEBUG( "adding item `%s' ( %s )", p_input->psz_name,
p_input->psz_uri ); p_input->psz_uri );
...@@ -889,7 +889,7 @@ static void AddItem( playlist_t *p_playlist, playlist_item_t *p_item, ...@@ -889,7 +889,7 @@ static void AddItem( playlist_t *p_playlist, playlist_item_t *p_item,
else else
playlist_NodeInsert( p_playlist, p_item, p_node, i_pos ); playlist_NodeInsert( p_playlist, p_item, p_node, i_pos );
if( !p_playlist->b_doing_ml ) if( !pl_priv(p_playlist)->b_doing_ml )
playlist_SendAddNotify( p_playlist, p_item->i_id, p_node->i_id, playlist_SendAddNotify( p_playlist, p_item->i_id, p_node->i_id,
!( i_mode & PLAYLIST_NO_REBUILD ) ); !( i_mode & PLAYLIST_NO_REBUILD ) );
} }
......
...@@ -160,7 +160,7 @@ int playlist_MLLoad( playlist_t *p_playlist ) ...@@ -160,7 +160,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
vlc_event_attach( &p_input->event_manager, vlc_InputItemSubItemAdded, vlc_event_attach( &p_input->event_manager, vlc_InputItemSubItemAdded,
input_item_subitem_added, p_playlist ); input_item_subitem_added, p_playlist );
p_playlist->b_doing_ml = true; pl_priv(p_playlist)->b_doing_ml = true;
PL_UNLOCK; PL_UNLOCK;
stats_TimerStart( p_playlist, "ML Load", STATS_TIMER_ML_LOAD ); stats_TimerStart( p_playlist, "ML Load", STATS_TIMER_ML_LOAD );
...@@ -168,7 +168,7 @@ int playlist_MLLoad( playlist_t *p_playlist ) ...@@ -168,7 +168,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
stats_TimerStop( p_playlist,STATS_TIMER_ML_LOAD ); stats_TimerStop( p_playlist,STATS_TIMER_ML_LOAD );
PL_LOCK; PL_LOCK;
p_playlist->b_doing_ml = false; pl_priv(p_playlist)->b_doing_ml = false;
PL_UNLOCK; PL_UNLOCK;
vlc_event_detach( &p_input->event_manager, vlc_InputItemSubItemAdded, vlc_event_detach( &p_input->event_manager, vlc_InputItemSubItemAdded,
......
...@@ -102,7 +102,7 @@ typedef struct playlist_private_t ...@@ -102,7 +102,7 @@ typedef struct playlist_private_t
} request; } request;
bool b_tree; /**< Display as a tree */ bool b_tree; /**< Display as a tree */
bool b_doing_ml; /**< Doing media library stuff get quicker */
} playlist_private_t; } playlist_private_t;
#define pl_priv( pl ) ((playlist_private_t *)(pl)) #define pl_priv( pl ) ((playlist_private_t *)(pl))
......
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