/[xmltv_parser]/trunk/GBPVRProgramDatabaseFixer/Program.cs
ViewVC logotype

Diff of /trunk/GBPVRProgramDatabaseFixer/Program.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 250 by william, Thu Mar 28 06:58:11 2013 UTC revision 251 by william, Sat Mar 30 04:46:15 2013 UTC
# Line 1  Line 1 
1  #define OVERRIDE_COMMANDLINE_ARGUMENTS // when defined will override supplied commandline args  #define OVERRIDE_COMMANDLINE_ARGUMENTS // when defined will override supplied commandline args
2    //#define ENABLE_SCHEDULDED_RECORDINGS_FIXUP // when defined will enable calls to CheckScheduledRecordingsForDiscrepancies
3    
4  using System;  using System;
5  using System.Collections.Generic;  using System.Collections.Generic;
6  using System.Text;  using System.Text;
# Line 226  namespace GBPVRProgramDatabaseFixer Line 228  namespace GBPVRProgramDatabaseFixer
228    
229          static void CheckScheduledRecordingsForDiscrepancies(List<SQLLITE.IRECORDING_SCHEDULE> recordings, List<SQLLITE.IPROGRAMME> programs)          static void CheckScheduledRecordingsForDiscrepancies(List<SQLLITE.IRECORDING_SCHEDULE> recordings, List<SQLLITE.IPROGRAMME> programs)
230          {          {
231              List<SQLLITE.IRECORDING_SCHEDULE> recordings_to_delete = new List<SQLLITE.IRECORDING_SCHEDULE>();  #if !ENABLE_SCHEDULDED_RECORDINGS_FIXUP
232              //List<SQLLITE.IRECORDING_SCHEDULE> deleted_recordings = new List<SQLLITE.IRECORDING_SCHEDULE>();               gLog.Warn.WriteLine("WANRING: Checking scheduled recordings for errors (and then deleting them) has been disabled.");
233              //List<SQLLITE.IRECORDING_SCHEDULE> reocurring_recordings = new List<SQLLITE.IRECORDING_SCHEDULE>();  #else
234                List<SQLLITE.IRECORDING_SCHEDULE> recordings_to_delete = new List<SQLLITE.IRECORDING_SCHEDULE>();    
   
             //reocurring_recordings = recordings.FindAll(s => s.recording_type != (long)RecordingType.TYPE_RECORD_ONCE).ToList();  
   
235              foreach (var recording in recordings)              foreach (var recording in recordings)
236              {              {
237                  RecordingStatus status = (RecordingStatus)recording.status;                  RecordingStatus status = (RecordingStatus)recording.status;
# Line 271  namespace GBPVRProgramDatabaseFixer Line 270  namespace GBPVRProgramDatabaseFixer
270                  gLog.Info.WriteLine("Found {0} recordings to delete.", recordings_to_delete.Count);                  gLog.Info.WriteLine("Found {0} recordings to delete.", recordings_to_delete.Count);
271                  sqlite.DeleteGBPVRScheduledRecordings(recordings_to_delete);                  sqlite.DeleteGBPVRScheduledRecordings(recordings_to_delete);
272              }              }
   
273              try              try
274              {              {
275    
# Line 285  namespace GBPVRProgramDatabaseFixer Line 283  namespace GBPVRProgramDatabaseFixer
283              {              {
284                  gLog.Error.WriteLine(ex.ToString());                  gLog.Error.WriteLine(ex.ToString());
285              }              }
286    #endif
287          }          }
288      }      }
289  }  }

Legend:
Removed from v.250  
changed lines
  Added in v.251

  ViewVC Help
Powered by ViewVC 1.1.22