/[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 20:37:11	161
+++ trunk/GBPVRProgramDatabaseFixer/Program.cs	2013/03/14 21:40:19	162
@@ -174,14 +174,25 @@
         static List<SQLLITE.IPROGRAMME> gbpvr_programs;
         static List<SQLLITE.ICHANNEL> gbpvr_channels;
         static List<SQLLITE.IRECORDING_SCHEDULE> gbpvr_recordings;
-        static IProgramDefinitionList xmltv_programs;
+        static List<libxmltv.Interfaces.IProgramDefinition> xmltv_programs;
         static void PerformDatabaseProcessing()
         {
             gbpvr_channels = sqlite.Channels;
             gbpvr_programs = sqlite.Programs;
             gbpvr_recordings = sqlite.Recordings;            
             Type datatype;
-            xmltv_programs = (IProgramDefinitionList)XMLTV.CreateBindingSourceFromData(XMLTV.GetPrograms(), out datatype);
+            var xmlt_raw_program_data = (IProgramDefinitionList)XMLTV.CreateBindingSourceFromData(XMLTV.GetPrograms(), out datatype);
+            xmltv_programs = xmlt_raw_program_data.ToList().OrderBy(p => p.ChannelNumber).ThenBy(p => DateTime.Parse(p.Start)).ToList();
+
+
+            xmltv_programs = xmltv_programs.FindAll(p => p.Title == "Law & Order: Criminal Intent").ToList();
+
+
+
+            //var data = xmltv_programs[0];
+            //DateTime p = DateTime.Parse(data.Start);
+            //string strP = p.ToString("yyyy/MM/dd HH:mm:ss.fffffff");
+            
             CheckScheduledRecordingsForDiscrepancies();
             CheckProgramsForDiscrepancies();
         }

 

  ViewVC Help
Powered by ViewVC 1.1.22