/[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 189 by william, Sat Mar 16 19:56:47 2013 UTC revision 190 by william, Sat Mar 16 19:59:44 2013 UTC
# Line 816  namespace GBPVRProgramDatabaseFixer Line 816  namespace GBPVRProgramDatabaseFixer
816          }          }
817    
818          public void RemoveOldGBPVRPrograms(List<SQLLITE.IPROGRAMME> programs)          public void RemoveOldGBPVRPrograms(List<SQLLITE.IPROGRAMME> programs)
819          {          {            
820              gLog.Info.WriteLine("Removing all gbpvr programs.");              gLog.Info.WriteLine("Removing all gbpvr programs.");
821              //double total = programs.Count;              //double total = programs.Count;
822              //double index = 0;              //double index = 0;
# Line 831  namespace GBPVRProgramDatabaseFixer Line 831  namespace GBPVRProgramDatabaseFixer
831              //    }              //    }
832              //    index++;              //    index++;
833              //}              //}
834                if (!RemoveAllProgramDatabaseEntries())              Stopwatch st = new Stopwatch();
835                {              st.Start();
836                    gLog.Error.WriteLine("Failed to remove one or more program entries");              if (!RemoveAllProgramDatabaseEntries())
837                }              {
838                    gLog.Error.WriteLine("Failed to remove one or more program(s)");
839                }
840                st.Stop();
841                gLog.Warn.WriteLine("    operation took: {0} seconds", st.Elapsed.TotalSeconds);
842          }          }
843          public void UpdateGBPVRPrograms(List<IOldNewProgram> programs)          public void UpdateGBPVRPrograms(List<IOldNewProgram> programs)
844          {          {
# Line 849  namespace GBPVRProgramDatabaseFixer Line 853  namespace GBPVRProgramDatabaseFixer
853              }              }
854              new_program_list.TrimExcess();              new_program_list.TrimExcess();
855              gLog.Info.WriteLine("Inserting {0} gbpvr programs.", new_program_list.Count);              gLog.Info.WriteLine("Inserting {0} gbpvr programs.", new_program_list.Count);
856                Stopwatch st = new Stopwatch();
857                st.Start();
858              if (!InsertProgramEntryDatabase(new_program_list))              if (!InsertProgramEntryDatabase(new_program_list))
859              {              {
860                  gLog.Error.WriteLine("Failed to insert program(s)");                  gLog.Error.WriteLine("Failed to insert one or more program(s)");
861              }              }
862              //string command = BuildGBPVRMultiInsertCommand(new_program_list);              //string command = BuildGBPVRMultiInsertCommand(new_program_list);
863                st.Stop();
864                gLog.Warn.WriteLine("    operation took: {0} seconds", st.Elapsed.TotalSeconds);
865          }          }
866    
867          private bool RemoveAllProgramDatabaseEntries()          private bool RemoveAllProgramDatabaseEntries()

Legend:
Removed from v.189  
changed lines
  Added in v.190

  ViewVC Help
Powered by ViewVC 1.1.22