/[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/14 17:10:09	155
+++ trunk/GBPVRProgramDatabaseFixer/Program.cs	2013/03/14 19:41:32	158
@@ -12,6 +12,7 @@
 {
     class Program
     {
+        static SQLLITE sqlite;
         static string XMLTV_FILE = "";
         static string GBPVR_DATABASE = "";
 
@@ -85,6 +86,7 @@
 
             LoadXMLTVFile();
             LoadGBPVRDatabase();
+            PerformDatabaseProcessing();       
         }
 
         static void ConsoleOverwritePreviosLine(string format, params object[] args)
@@ -160,8 +162,32 @@
                 return;
             }
 
-
+            sqlite = new SQLLITE(fi_GBPVRDATABASE.FullName, new EventHandler<EventArgs>(SQLLITE_OnInstanceCreated));
+            while (!SQLLIST_INSTANCE_CREATED) { Application.DoEvents(); }
             LOADING_GBPVR_DATABASE = false;
         }
+        static void SQLLITE_OnInstanceCreated(object sender, EventArgs e) { SQLLIST_INSTANCE_CREATED = true; }
+
+
+        static List<SQLLITE.IPROGRAMME> gbpvr_programs;
+        static List<SQLLITE.IRECORDING_SCHEDULE> gbpvr_recordings;
+        static List<libxmltv.Interfaces.IXMLTVProgram> xmltv_programs;
+        static void PerformDatabaseProcessing()
+        {
+            gbpvr_programs = sqlite.Programs;
+            gbpvr_recordings = sqlite.Recordings;
+            xmltv_programs = XMLTV.GetPrograms();
+            CheckScheduledRecordingsForDiscrepancies();
+            CheckProgramsForDiscrepancies();
+        }
+
+        static void CheckScheduledRecordingsForDiscrepancies()
+        {
+            gLog.Warn.WriteLine("CheckScheduledRecordingsForDiscrepancies() has not been implemented");
+        }
+        static void CheckProgramsForDiscrepancies()
+        {
+            gLog.Warn.WriteLine("CheckProgramsForDiscrepancies() has not been implemented");
+        }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22