Commit 2893fcef authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

playlist: remove b_auto_preparse

parent 7cf96573
......@@ -230,14 +230,6 @@ playlist_t *playlist_Create( vlc_object_t *p_parent )
pl_priv(p_playlist)->b_doing_ml = false;
pl_priv(p_playlist)->b_auto_preparse =
var_InheritBool( p_parent, "auto-preparse" );
/* Preparser (and meta retriever) */
p->p_preparser = playlist_preparser_New( VLC_OBJECT(p_playlist) );
if( unlikely(p->p_preparser == NULL) )
msg_Err( p_playlist, "cannot create preparser" );
/* Create the root node */
PL_LOCK;
p_playlist->p_root = playlist_NodeCreate( p_playlist, NULL, NULL,
......@@ -284,11 +276,14 @@ playlist_t *playlist_Create( vlc_object_t *p_parent )
pl_priv(p_playlist)->status.i_status = PLAYLIST_STOPPED;
if(b_ml)
{
const bool b_auto_preparse = pl_priv(p_playlist)->b_auto_preparse;
pl_priv(p_playlist)->b_auto_preparse = false;
playlist_MLLoad( p_playlist );
pl_priv(p_playlist)->b_auto_preparse = b_auto_preparse;
/* Preparser (and meta retriever) _after_ the Media Library*/
if( var_InheritBool( p_parent, "auto-preparse" ) )
{
p->p_preparser = playlist_preparser_New( VLC_OBJECT(p_playlist) );
if( unlikely(p->p_preparser == NULL) )
msg_Err( p_playlist, "cannot create preparser" );
}
/* Input resources */
......
......@@ -770,7 +770,7 @@ static void GoAndPreparse( playlist_t *p_playlist, int i_mode,
enabled*/
char *psz_artist = input_item_GetArtist( p_item->p_input );
char *psz_album = input_item_GetAlbum( p_item->p_input );
if( sys->b_auto_preparse && !input_item_IsPreparsed( p_item->p_input )
if( sys->p_preparser != NULL && !input_item_IsPreparsed( p_item->p_input )
&& (EMPTY_STR(psz_artist) || EMPTY_STR(psz_album)) )
playlist_preparser_Push( sys->p_preparser, p_item->p_input );
free( psz_artist );
......
......@@ -90,7 +90,6 @@ typedef struct playlist_private_t
bool b_tree; /**< Display as a tree */
bool b_doing_ml; /**< Doing media library stuff get quicker */
bool b_auto_preparse;
} playlist_private_t;
#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