/[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 164 by william, Fri Mar 15 16:57:50 2013 UTC revision 165 by william, Fri Mar 15 17:33:15 2013 UTC
# Line 7  using System.Data.SQLite; Line 7  using System.Data.SQLite;
7  using System.Diagnostics;  using System.Diagnostics;
8  using Enterprise.Logging;  using Enterprise.Logging;
9  using libxmltv;  using libxmltv;
10    using libxmltv.Interfaces;
11    using libxmltv.Core;
12  namespace GBPVRProgramDatabaseFixer  namespace GBPVRProgramDatabaseFixer
13  {  {
14      public interface ISQLLITE      public interface ISQLLITE
# Line 198  namespace GBPVRProgramDatabaseFixer Line 200  namespace GBPVRProgramDatabaseFixer
200              Int64 channel_oid { get; }              Int64 channel_oid { get; }
201              String unique_identifier { get; }              String unique_identifier { get; }
202              String rating { get; }              String rating { get; }
203    
204                IProgramDefinition AsXMLTVProgramDefinition(ISQLLITE sqllite);
205          }          }
206          private class PROGRAMME : IPROGRAMME          private class PROGRAMME : IPROGRAMME
207          {          {
# Line 220  namespace GBPVRProgramDatabaseFixer Line 224  namespace GBPVRProgramDatabaseFixer
224              public Int64 channel_oid { get; set; }              public Int64 channel_oid { get; set; }
225              public String unique_identifier { get; set; }              public String unique_identifier { get; set; }
226              public String rating { get; set; }              public String rating { get; set; }
227                public IProgramDefinition AsXMLTVProgramDefinition(ISQLLITE sqllite)
228                {
229                    ProgramList.ProgramDefintion definition = new ProgramList.ProgramDefintion();
230                    var channel = sqllite.Channels.Find(s => s.oid == this.channel_oid);
231                    definition.ChannelName = channel.display_name;
232                    definition.ChannelNumber = (int)channel.channel_number;
233                    definition.Description = this.description;
234                    definition.Start = this.start_time.ToString("");
235                    definition.Stop = this.end_time.ToString("");
236                    definition.SubTitle = this.sub_title;
237                    definition.Title = this.name;
238                    return definition;
239                }
240              #endregion              #endregion
241          }          }
242          #endregion          #endregion

Legend:
Removed from v.164  
changed lines
  Added in v.165

  ViewVC Help
Powered by ViewVC 1.1.22