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

--- trunk/GBPVRProgramDatabaseFixer/Program.cs	2013/03/28 06:58:11	250
+++ trunk/GBPVRProgramDatabaseFixer/Program.cs	2013/03/30 04:46:15	251
@@ -1,4 +1,6 @@
 #define OVERRIDE_COMMANDLINE_ARGUMENTS // when defined will override supplied commandline args
+//#define ENABLE_SCHEDULDED_RECORDINGS_FIXUP // when defined will enable calls to CheckScheduledRecordingsForDiscrepancies
+
 using System;
 using System.Collections.Generic;
 using System.Text;
@@ -226,13 +228,10 @@
 
         static void CheckScheduledRecordingsForDiscrepancies(List<SQLLITE.IRECORDING_SCHEDULE> recordings, List<SQLLITE.IPROGRAMME> programs)
         {
-            List<SQLLITE.IRECORDING_SCHEDULE> recordings_to_delete = new List<SQLLITE.IRECORDING_SCHEDULE>();
-            //List<SQLLITE.IRECORDING_SCHEDULE> deleted_recordings = new List<SQLLITE.IRECORDING_SCHEDULE>();
-            //List<SQLLITE.IRECORDING_SCHEDULE> reocurring_recordings = new List<SQLLITE.IRECORDING_SCHEDULE>();
-
-
-            //reocurring_recordings = recordings.FindAll(s => s.recording_type != (long)RecordingType.TYPE_RECORD_ONCE).ToList();
-
+#if !ENABLE_SCHEDULDED_RECORDINGS_FIXUP
+             gLog.Warn.WriteLine("WANRING: Checking scheduled recordings for errors (and then deleting them) has been disabled.");
+#else
+            List<SQLLITE.IRECORDING_SCHEDULE> recordings_to_delete = new List<SQLLITE.IRECORDING_SCHEDULE>();    
             foreach (var recording in recordings)
             {
                 RecordingStatus status = (RecordingStatus)recording.status;
@@ -271,7 +270,6 @@
                 gLog.Info.WriteLine("Found {0} recordings to delete.", recordings_to_delete.Count);
                 sqlite.DeleteGBPVRScheduledRecordings(recordings_to_delete);
             }
-
             try
             {
 
@@ -285,6 +283,7 @@
             {
                 gLog.Error.WriteLine(ex.ToString());
             }
+#endif
         }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22