/[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 186 by william, Sat Mar 16 19:12:26 2013 UTC revision 187 by william, Sat Mar 16 19:13:18 2013 UTC
# Line 817  namespace GBPVRProgramDatabaseFixer Line 817  namespace GBPVRProgramDatabaseFixer
817    
818          public void RemoveOldGBPVRPrograms(List<SQLLITE.IPROGRAMME> programs)          public void RemoveOldGBPVRPrograms(List<SQLLITE.IPROGRAMME> programs)
819          {          {
820              gLog.Info.WriteLine("Removing {0} old gbpvr programs.", programs.Count);              gLog.Info.WriteLine("Removing all gbpvr programs.");
821              //double total = programs.Count;              //double total = programs.Count;
822              //double index = 0;              //double index = 0;
823              //double progress = 0;              //double progress = 0;
# Line 838  namespace GBPVRProgramDatabaseFixer Line 838  namespace GBPVRProgramDatabaseFixer
838          }          }
839          public void UpdateGBPVRPrograms(List<IOldNewProgram> programs)          public void UpdateGBPVRPrograms(List<IOldNewProgram> programs)
840          {          {
841              gLog.Info.WriteLine("Updating {0} gbpvr programs.", programs.Count);              gLog.Info.WriteLine("Inserting {0} gbpvr programs.", programs.Count);
842              double total = programs.Count;              double total = programs.Count;
843              double index = 0;              double index = 0;
844              double progress = 0;              double progress = 0;
845              foreach (var program in programs)              foreach (var program in programs)
846              {              {
847                  progress = 100.0 * (index / total);                  progress = 100.0 * (index / total);
848                  gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Updating GBPVR Programs: {0:00}%", (int)progress)));                  gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Updating/Inserting GBPVR Programs: {0:00}%", (int)progress)));
849                  if (program.NewProgram.Equals(program.OldProgram))                  if (program.NewProgram.Equals(program.OldProgram))
850                  {                  {
851                      // program does not need to be updated                      // program does not need to be updated

Legend:
Removed from v.186  
changed lines
  Added in v.187

  ViewVC Help
Powered by ViewVC 1.1.22