Commit 7cf96573 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

playlist: use playlist preparser for playlist items (fixes #10344)

parent 9781b239
......@@ -752,27 +752,27 @@ mtime_t playlist_GetNodeDuration( playlist_item_t* node )
static void GoAndPreparse( playlist_t *p_playlist, int i_mode,
playlist_item_t *p_item )
{
playlist_private_t *sys = pl_priv(p_playlist);
PL_ASSERT_LOCKED;
if( (i_mode & PLAYLIST_GO ) )
{
pl_priv(p_playlist)->request.b_request = true;
pl_priv(p_playlist)->request.i_skip = 0;
pl_priv(p_playlist)->request.p_item = p_item;
if( pl_priv(p_playlist)->p_input )
input_Stop( pl_priv(p_playlist)->p_input, true );
pl_priv(p_playlist)->request.i_status = PLAYLIST_RUNNING;
vlc_cond_signal( &pl_priv(p_playlist)->signal );
sys->request.b_request = true;
sys->request.i_skip = 0;
sys->request.p_item = p_item;
if( sys->p_input != NULL )
input_Stop( sys->p_input, true );
sys->request.i_status = PLAYLIST_RUNNING;
vlc_cond_signal( &sys->signal );
}
/* Preparse if no artist/album info, and hasn't been preparsed allready
and if user has some preparsing option (auto-preparse variable)
enabled*/
char *psz_artist = input_item_GetArtist( p_item->p_input );
char *psz_album = input_item_GetAlbum( p_item->p_input );
if( pl_priv(p_playlist)->b_auto_preparse &&
input_item_IsPreparsed( p_item->p_input ) == false &&
( EMPTY_STR( psz_artist ) || ( EMPTY_STR( psz_album ) ) )
)
libvlc_MetaRequest( p_playlist->p_libvlc, p_item->p_input );
if( sys->b_auto_preparse && !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 );
free( psz_album );
}
......
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