/[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 22:27:15	200
+++ trunk/GBPVRProgramDatabaseFixer/SQLLITE.cs	2013/03/16 22:34:30	201
@@ -857,20 +857,20 @@
             st1.Start();
             foreach (var p in ChunkList)
             {
-                Stopwatch st2 = new Stopwatch();
-                st2.Start();
+                //Stopwatch st2 = new Stopwatch();
+                //st2.Start();
                 progress = 100.0 * (index / total);
-                gLog.Warn.WriteLine("Inserting {0} gbpvr programs.", p.Count());   
-                if (!InsertProgramEntryDatabase(p.ToList()))
+                gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Inserting GBPVR Programs: {0:00}%", (int)progress)));
+                //gLog.Warn.WriteLine("Inserting {0} gbpvr programs.", p.Count());   
+                if (!InsertProgramEntryDatabase(p))
                 {
                     gLog.Error.WriteLine("Failed to insert one or more program(s)");
                 }
-                st2.Stop();
-                gLog.Warn.WriteLine("    operation took: {0:0.00000} seconds", st2.Elapsed.TotalSeconds);
-                gLog.Warn.WriteLine(System.Environment.NewLine);
-                gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Inserting GBPVR Programs: {0:00}%", (int)progress)));
-                index += (double)p.Count();
+                //st2.Stop();
+                //gLog.Warn.WriteLine("    operation took: {0:0.00000} seconds", st2.Elapsed.TotalSeconds);
+                //gLog.Warn.WriteLine(System.Environment.NewLine);
                 
+                index += (double)p.Count();                
             }
             st1.Stop();
             gLog.Warn.WriteLine("    operation took: {0:0.00000} minutes overall", st1.Elapsed.TotalMinutes);
@@ -954,7 +954,7 @@
             }
             return result;
         }
-        private bool InsertProgramEntryDatabase(List<IPROGRAMME> list)
+        private bool InsertProgramEntryDatabase(IEnumerable<IPROGRAMME> list)
         {
             bool result = false;
             try
@@ -996,7 +996,7 @@
             return result;
         }
 
-        private string BuildGBPVRMultiInsertCommand(List<IPROGRAMME> list)
+        private string BuildGBPVRMultiInsertCommand(IEnumerable<IPROGRAMME> list)
         {
             StringBuilder builder = new StringBuilder();
             /*

 

  ViewVC Help
Powered by ViewVC 1.1.22