[vlc-devel] commit: playlist: b_auto_preparse is private. (Pierre d'Herbemont )

git version control git at videolan.org
Sun Sep 28 17:14:50 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sun Sep 28 16:42:05 2008 +0200| [09995291a6fed158bae8160a877e9d663a072c32] | committer: Pierre d'Herbemont 

playlist: b_auto_preparse is private.

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

 include/vlc_playlist.h           |    2 --
 src/playlist/engine.c            |    8 ++++----
 src/playlist/item.c              |    2 +-
 src/playlist/playlist_internal.h |    1 +
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index 65c7b20..29b79c1 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -177,8 +177,6 @@ struct playlist_t
     playlist_item_t *     p_local_onelevel; /** < "Playlist" in ONELEVEL view */
     playlist_item_t *     p_ml_onelevel; /** < "Library" in ONELEVEL view */
 
-    bool            b_auto_preparse;
-
     /* Runtime */
     int                   i_sort; /**< Last sorting applied to the playlist */
     int                   i_order; /**< Last ordering applied to the playlist */
diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index ee7e2ee..ed041c7 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -98,7 +98,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
 
     pl_priv(p_playlist)->b_doing_ml = false;
 
-    p_playlist->b_auto_preparse =
+    pl_priv(p_playlist)->b_auto_preparse =
                         var_CreateGetBool( p_playlist, "auto-preparse" ) ;
 
     PL_LOCK; /* playlist_NodeCreate will check for it */
@@ -155,10 +155,10 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
     p_playlist->i_order = ORDER_NORMAL;
 
 
-    b_save = p_playlist->b_auto_preparse;
-    p_playlist->b_auto_preparse = false;
+    b_save = pl_priv(p_playlist)->b_auto_preparse;
+    pl_priv(p_playlist)->b_auto_preparse = false;
     playlist_MLLoad( p_playlist );
-    p_playlist->b_auto_preparse = true;
+    pl_priv(p_playlist)->b_auto_preparse = true;
 
     vlc_object_set_destructor( p_playlist, playlist_Destructor );
 
diff --git a/src/playlist/item.c b/src/playlist/item.c
index 6c276bd..492ec3a 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -863,7 +863,7 @@ static void GoAndPreparse( playlist_t *p_playlist, int i_mode,
     /* Preparse if PREPARSE or SPREPARSE & not enough meta */
     char *psz_artist = input_item_GetArtist( p_item_cat->p_input );
     char *psz_album = input_item_GetAlbum( p_item_cat->p_input );
-    if( p_playlist->b_auto_preparse &&
+    if( pl_priv(p_playlist)->b_auto_preparse &&
           (i_mode & PLAYLIST_PREPARSE ||
           ( i_mode & PLAYLIST_SPREPARSE &&
             ( EMPTY_STR( psz_artist ) || ( EMPTY_STR( psz_album ) ) )
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index d0af7a7..8a17401 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -103,6 +103,7 @@ 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))




More information about the vlc-devel mailing list