/[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

revision 194 by william, Sat Mar 16 21:37:29 2013 UTC revision 195 by william, Sat Mar 16 21:44:30 2013 UTC
# Line 867  namespace GBPVRProgramDatabaseFixer Line 867  namespace GBPVRProgramDatabaseFixer
867              int total = programs.Count;              int total = programs.Count;
868              int index = 0;              int index = 0;
869              double progress = 0;              double progress = 0;
870                Stopwatch st = new Stopwatch();
871                st.Start();
872              foreach (var p in array_list)              foreach (var p in array_list)
873              {              {
874                  progress = 100.0 * (index / total);                  progress = 100.0 * (index / total);              
875                                  //gLog.Info.WriteLine("Inserting {0} gbpvr programs.", p.Count);  
                 gLog.Info.WriteLine("Inserting {0} gbpvr programs.", p.Count);                  
                 Stopwatch st = new Stopwatch();  
                 st.Start();  
876                  if (!InsertProgramEntryDatabase(p))                  if (!InsertProgramEntryDatabase(p))
877                  {                  {
878                      gLog.Error.WriteLine("Failed to insert one or more program(s)");                      gLog.Error.WriteLine("Failed to insert one or more program(s)");
879                  }                  }              
                 st.Stop();  
                 gLog.Warn.WriteLine("    operation took: {0:0.00000} minutes", st.Elapsed.TotalMinutes);  
880                  gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Inserting GBPVR Programs: {0:00}%", (int)progress)));                  gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Inserting GBPVR Programs: {0:00}%", (int)progress)));
881                  index += p.Count;                  index += p.Count;
882              }                        }
883                st.Stop();
884                gLog.Warn.WriteLine("    operation took: {0:0.00000} minutes", st.Elapsed.TotalMinutes);
885          }          }
886    
887          private bool RemoveAllProgramDatabaseEntries()          private bool RemoveAllProgramDatabaseEntries()

Legend:
Removed from v.194  
changed lines
  Added in v.195

  ViewVC Help
Powered by ViewVC 1.1.22