]> git.sesse.net Git - vlc/commitdiff
Add an "auto-preparse" option (default TRUE) - Refs:#192
authorClément Stenac <zorglub@videolan.org>
Sat, 21 Jan 2006 17:59:14 +0000 (17:59 +0000)
committerClément Stenac <zorglub@videolan.org>
Sat, 21 Jan 2006 17:59:14 +0000 (17:59 +0000)
src/libvlc.h
src/playlist/item-ext.c

index babfc3c06c674ecff53845eb7ed8110e6c9d56cd..9d5336dddbe729d0027496101f98756dcb8af9b9 100644 (file)
@@ -687,6 +687,11 @@ static char *ppsz_clock_descriptions[] =
      "These options define the behavior of the playlist. Some " \
      "of them can be overridden in the playlist dialog box." )
 
+#define PREPARSE_TEXT N_( "Automatically preparse files")
+#define PREPARSE_LONGTEXT N_( \
+    "This option enables automatic preparsing of files added to the playlist " \
+    "(to retrieve some metadata)." )
+
 #define SD_TEXT N_( "Services discovery modules")
 #define SD_LONGTEXT N_( \
      "Specifies the services discovery modules to load, separated by " \
@@ -1384,6 +1389,8 @@ vlc_module_begin();
 
     add_string( "open", "", NULL, OPEN_TEXT, OPEN_LONGTEXT, VLC_FALSE );
 
+    add_bool( "auto-preparse", VLC_TRUE, NULL, PREPARSE_TEXT, PREPARSE_LONGTEXT, VLC_FALSE );
+
     set_subcategory( SUBCAT_PLAYLIST_SD );
     add_module_list_cat( "services-discovery", SUBCAT_PLAYLIST_SD, NULL,
                           NULL, SD_TEXT, SD_LONGTEXT, VLC_FALSE );
index b52ed4348266fbebd2e21a304962c049ff2fcd9d..532ac3df8b09dc534e113cbefe261fc982097ee8 100644 (file)
@@ -243,7 +243,8 @@ int playlist_AddItem( playlist_t *p_playlist, playlist_item_t *p_item,
         p_playlist->status.i_status = PLAYLIST_RUNNING;
     }
 
-    if( i_mode & PLAYLIST_PREPARSE )
+    if( i_mode & PLAYLIST_PREPARSE &&
+        var_CreateGetBool( p_playlist, "auto-preparse" ) )
     {
         playlist_PreparseEnqueue( p_playlist, &p_item->input );
     }
@@ -368,7 +369,8 @@ int playlist_NodeAddItem( playlist_t *p_playlist, playlist_item_t *p_item,
         }
         p_playlist->status.i_status = PLAYLIST_RUNNING;
     }
-    if( i_mode & PLAYLIST_PREPARSE )
+    if( i_mode & PLAYLIST_PREPARSE &&
+        var_CreateGetBool( p_playlist, "auto-preparse" ) )
     {
         playlist_PreparseEnqueue( p_playlist, &p_item->input );
     }