/[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 200 by william, Sat Mar 16 22:27:15 2013 UTC revision 201 by william, Sat Mar 16 22:34:30 2013 UTC
# Line 857  namespace GBPVRProgramDatabaseFixer Line 857  namespace GBPVRProgramDatabaseFixer
857              st1.Start();              st1.Start();
858              foreach (var p in ChunkList)              foreach (var p in ChunkList)
859              {              {
860                  Stopwatch st2 = new Stopwatch();                  //Stopwatch st2 = new Stopwatch();
861                  st2.Start();                  //st2.Start();
862                  progress = 100.0 * (index / total);                  progress = 100.0 * (index / total);
863                  gLog.Warn.WriteLine("Inserting {0} gbpvr programs.", p.Count());                    gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Inserting GBPVR Programs: {0:00}%", (int)progress)));
864                  if (!InsertProgramEntryDatabase(p.ToList()))                  //gLog.Warn.WriteLine("Inserting {0} gbpvr programs.", p.Count());  
865                    if (!InsertProgramEntryDatabase(p))
866                  {                  {
867                      gLog.Error.WriteLine("Failed to insert one or more program(s)");                      gLog.Error.WriteLine("Failed to insert one or more program(s)");
868                  }                  }
869                  st2.Stop();                  //st2.Stop();
870                  gLog.Warn.WriteLine("    operation took: {0:0.00000} seconds", st2.Elapsed.TotalSeconds);                  //gLog.Warn.WriteLine("    operation took: {0:0.00000} seconds", st2.Elapsed.TotalSeconds);
871                  gLog.Warn.WriteLine(System.Environment.NewLine);                  //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();  
872                                    
873                    index += (double)p.Count();                
874              }              }
875              st1.Stop();              st1.Stop();
876              gLog.Warn.WriteLine("    operation took: {0:0.00000} minutes overall", st1.Elapsed.TotalMinutes);              gLog.Warn.WriteLine("    operation took: {0:0.00000} minutes overall", st1.Elapsed.TotalMinutes);
# Line 954  namespace GBPVRProgramDatabaseFixer Line 954  namespace GBPVRProgramDatabaseFixer
954              }              }
955              return result;              return result;
956          }          }
957          private bool InsertProgramEntryDatabase(List<IPROGRAMME> list)          private bool InsertProgramEntryDatabase(IEnumerable<IPROGRAMME> list)
958          {          {
959              bool result = false;              bool result = false;
960              try              try
# Line 996  namespace GBPVRProgramDatabaseFixer Line 996  namespace GBPVRProgramDatabaseFixer
996              return result;              return result;
997          }          }
998    
999          private string BuildGBPVRMultiInsertCommand(List<IPROGRAMME> list)          private string BuildGBPVRMultiInsertCommand(IEnumerable<IPROGRAMME> list)
1000          {          {
1001              StringBuilder builder = new StringBuilder();              StringBuilder builder = new StringBuilder();
1002              /*              /*

Legend:
Removed from v.200  
changed lines
  Added in v.201

  ViewVC Help
Powered by ViewVC 1.1.22