Commit cf59d2a3 authored by Filip Roséen's avatar Filip Roséen Committed by Hugo Beauzée-Luyssen

playlist: cancel preparsing upon playback

This will cancel any pending request for preparsing the relevant
playlist_item_t as preparsing the entity:

 - is redundant since we are about to start playback,
 - can remove metadata added during playback, and;
 - can lead to duplicate entries in the playlist if the
   playlist_item_t is a directory (as children are added each time
   such entity is "played").

fixes: #17441
fixes: #17232
Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent ea88b8d6
......@@ -776,7 +776,7 @@ static void GoAndPreparse( playlist_t *p_playlist, int i_mode,
if( sys->b_preparse && !input_item_IsPreparsed( p_item->p_input )
&& (EMPTY_STR(psz_artist) || EMPTY_STR(psz_album)) )
libvlc_MetadataRequest( p_playlist->obj.libvlc, p_item->p_input, 0, -1,
NULL );
p_item );
free( psz_artist );
free( psz_album );
}
......
......@@ -205,6 +205,8 @@ static bool PlayItem( playlist_t *p_playlist, playlist_item_t *p_item )
assert( p_sys->p_input == NULL );
PL_UNLOCK;
libvlc_MetadataCancel( p_playlist->obj.libvlc, p_item );
input_thread_t *p_input_thread = input_Create( p_playlist, p_input, NULL,
p_sys->p_input_resource );
if( likely(p_input_thread != NULL) )
......
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