]> git.sesse.net Git - vlc/commitdiff
Preparse items added through the directory access or directly to the interface (Refs...
authorClément Stenac <zorglub@videolan.org>
Sat, 21 Jan 2006 17:44:07 +0000 (17:44 +0000)
committerClément Stenac <zorglub@videolan.org>
Sat, 21 Jan 2006 17:44:07 +0000 (17:44 +0000)
modules/gui/wxwidgets/dialogs.cpp
modules/gui/wxwidgets/dialogs/open.cpp
src/network/httpd.c
src/playlist/item-ext.c

index 3260198f9bc7307dc9ceedf248e79bf52f8a9c06..b4da350b5dbe607fa87346611eb226edf6e8fdc4 100644 (file)
@@ -430,11 +430,12 @@ void DialogsProvider::OnOpenFileSimple( wxCommandEvent& event )
             char *psz_utf8 = wxFromLocale( paths[i] );
             if( event.GetInt() )
                 playlist_Add( p_playlist, psz_utf8, psz_utf8,
-                              PLAYLIST_APPEND | (i ? 0 : PLAYLIST_GO),
+                              PLAYLIST_APPEND | (i ? 0 : PLAYLIST_GO) |
+                              (i ? PLAYLIST_PREPARSE : 0 ),
                               PLAYLIST_END );
             else
                 playlist_Add( p_playlist, psz_utf8, psz_utf8,
-                              PLAYLIST_APPEND, PLAYLIST_END );
+                              PLAYLIST_APPEND | PLAYLIST_PREPARSE , PLAYLIST_END );
             wxLocaleFree( psz_utf8 );
         }
     }
@@ -460,7 +461,8 @@ void DialogsProvider::OnOpenDirectory( wxCommandEvent& event )
         wxString path = p_dir_dialog->GetPath();
         char *psz_utf8 = wxFromLocale( path );
         playlist_Add( p_playlist, psz_utf8, psz_utf8,
-                      PLAYLIST_APPEND | (event.GetInt() ? PLAYLIST_GO : 0),
+                      PLAYLIST_APPEND | (event.GetInt() ? PLAYLIST_GO : 0) |
+                      (event.GetInt() ? 0 : PLAYLIST_PREPARSE ),
                       PLAYLIST_END );
         wxLocaleFree( psz_utf8 );
     }
index 7bd52a31634f5e6aa9d875688af12a4bce41c0d0..796bf041f008af6e5fdcce18302dbee5b4d9fee7 100644 (file)
@@ -1200,7 +1200,8 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
             }
         }
 
-        playlist_AddItem( p_playlist, p_item, PLAYLIST_APPEND, PLAYLIST_END );
+        playlist_AddItem( p_playlist, p_item, PLAYLIST_APPEND|PLAYLIST_PREPARSE,
+                          PLAYLIST_END );
 
         if( b_start )
         {
index 0289358cc6a7532ae19cbae66fec95ecdd07b9f9..94bb3c69743b3cfe13a976bbda71e33e7637c145 100644 (file)
@@ -2553,7 +2553,7 @@ static void httpd_HostThread( httpd_host_t *host )
                             case 1: /* missing input - most likely */
                                 i_state = HTTPD_CLIENT_TLS_HS_IN;
                                 break;
-    
+
                             case 2: /* missing output */
                                 i_state = HTTPD_CLIENT_TLS_HS_OUT;
                                 break;
@@ -2563,8 +2563,7 @@ static void httpd_HostThread( httpd_host_t *host )
                     if( fd >= 0 )
                     {
                         httpd_client_t *cl;
-                        stats_UpdateInteger( host, "client_connections",
-                                             1 );
+                        stats_UpdateInteger( host, "client_connections", 1 );
                         stats_UpdateInteger( host, "active_connections", 1 );
                         cl = httpd_ClientNew( fd, &sock, i_sock_size, p_tls );
                         p_tls = NULL;
index 7f0dd22a5007f48f98ec3fb1b275d3dd90ee2141..b52ed4348266fbebd2e21a304962c049ff2fcd9d 100644 (file)
@@ -243,6 +243,11 @@ int playlist_AddItem( playlist_t *p_playlist, playlist_item_t *p_item,
         p_playlist->status.i_status = PLAYLIST_RUNNING;
     }
 
+    if( i_mode & PLAYLIST_PREPARSE )
+    {
+        playlist_PreparseEnqueue( p_playlist, &p_item->input );
+    }
+
     vlc_mutex_unlock( &p_playlist->object_lock );
 
     if( b_end == VLC_FALSE )
@@ -363,6 +368,10 @@ int playlist_NodeAddItem( playlist_t *p_playlist, playlist_item_t *p_item,
         }
         p_playlist->status.i_status = PLAYLIST_RUNNING;
     }
+    if( i_mode & PLAYLIST_PREPARSE )
+    {
+        playlist_PreparseEnqueue( p_playlist, &p_item->input );
+    }
 
     vlc_mutex_unlock( &p_playlist->object_lock );