/[xmltv_parser]/trunk/GBPVRProgramDatabaseFixer/SQLLITE.cs
ViewVC logotype

Diff of /trunk/GBPVRProgramDatabaseFixer/SQLLITE.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/GBPVRProgramDatabaseFixer/SQLLITE.cs	2013/03/16 21:37:29	194
+++ trunk/GBPVRProgramDatabaseFixer/SQLLITE.cs	2013/03/16 21:44:30	195
@@ -867,23 +867,21 @@
             int total = programs.Count;
             int index = 0;
             double progress = 0;
+            Stopwatch st = new Stopwatch();
+            st.Start();
             foreach (var p in array_list)
             {
-                progress = 100.0 * (index / total);
-               
-                gLog.Info.WriteLine("Inserting {0} gbpvr programs.", p.Count);                
-                Stopwatch st = new Stopwatch();
-                st.Start();
+                progress = 100.0 * (index / total);               
+                //gLog.Info.WriteLine("Inserting {0} gbpvr programs.", p.Count);   
                 if (!InsertProgramEntryDatabase(p))
                 {
                     gLog.Error.WriteLine("Failed to insert one or more program(s)");
-                }
-                st.Stop();
-                gLog.Warn.WriteLine("    operation took: {0:0.00000} minutes", st.Elapsed.TotalMinutes);
+                }               
                 gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Inserting GBPVR Programs: {0:00}%", (int)progress)));
                 index += p.Count;
-            }          
-
+            }
+            st.Stop();
+            gLog.Warn.WriteLine("    operation took: {0:0.00000} minutes", st.Elapsed.TotalMinutes);
         }
 
         private bool RemoveAllProgramDatabaseEntries()

 

  ViewVC Help
Powered by ViewVC 1.1.22