[vlc-devel] commit: playlist: add check if item is allready preparsed before adding it to queue ( Ilkka Ollakka )

git version control git at videolan.org
Wed Feb 3 16:40:06 CET 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Feb  3 17:38:20 2010 +0200| [8382cbe10f52aaa2ab3651c6a7d749c39fc98ce2] | committer: Ilkka Ollakka 

playlist: add check if item is allready preparsed before adding it to queue

Also remove setting item here as preparsed, as if it has meta, that should
have been done allready somewhere else. Preparsing is controlled by
auto-preparse -variable (no idea where it can be changed), and should work ok.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8382cbe10f52aaa2ab3651c6a7d749c39fc98ce2
---

 src/playlist/item.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/playlist/item.c b/src/playlist/item.c
index e0dc3d5..1c705a3 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -717,16 +717,16 @@ static void GoAndPreparse( playlist_t *p_playlist, int i_mode,
         pl_priv(p_playlist)->request.i_status = PLAYLIST_RUNNING;
         vlc_cond_signal( &pl_priv(p_playlist)->signal );
     }
-    /* Preparse if not enough meta */
+    /* 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 ) ) )
           )
         playlist_PreparseEnqueue( p_playlist, p_item->p_input, pl_Locked );
-    /* If we already have it, signal it */
-    else if( !EMPTY_STR( psz_artist ) && !EMPTY_STR( psz_album ) )
-        input_item_SetPreparsed( p_item->p_input, true );
     free( psz_artist );
     free( psz_album );
 }




More information about the vlc-devel mailing list