/[xmltv_parser]/trunk/xmltv_parser/main.cs
ViewVC logotype

Diff of /trunk/xmltv_parser/main.cs

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

--- trunk/xmltv_parser/main.cs	2013/03/10 09:10:42	96
+++ trunk/xmltv_parser/main.cs	2013/03/10 09:43:49	97
@@ -177,7 +177,12 @@
                 var instance = XMLTV.GetInstance();
                 var id = program.MetaData[XMLTVConstants.Programs.ProgramChannelId].ToString();
                 Channel = instance.Channels.Find(m => m.Id == id);
-                ListViewItem li = new ListViewItem(string.Format("{0} {1}", Channel.Number, Channel.CallSign));
+                //ListViewItem li = new ListViewItem(string.Format("{0} {1}", Channel.Number, Channel.CallSign));
+                if (Channel.MetaData.Count() == 0)
+                {
+                    throw new InvalidOperationException(string.Format("Unable to get channel display name for channel id: {0}", Channel.Id));
+                }
+                ListViewItem li = new ListViewItem(string.Format("{0}", Channel.MetaData[0].Value));
                 li.Tag = program;
                 li.SubItems.Add(new ListViewItem.ListViewSubItem(li, program.MetaData[XMLTVConstants.Programs.ProgramTitle].ToString()));
                 li.SubItems.Add(new ListViewItem.ListViewSubItem(li, program.MetaData[XMLTVConstants.Programs.ProgramSubTitle].ToString()));

 

  ViewVC Help
Powered by ViewVC 1.1.22