/[xmltv_parser]/trunk/libxmltv/Core/XMLTVProgram.cs
ViewVC logotype

Diff of /trunk/libxmltv/Core/XMLTVProgram.cs

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

--- trunk/libxmltv/Core/XMLTVProgram.cs	2013/03/10 11:35:26	105
+++ trunk/libxmltv/Core/XMLTVProgram.cs	2013/03/10 12:25:54	106
@@ -293,24 +293,20 @@
             public UnhandledExtraMetaData(XMLTVProgram instance, XElement node)
                 : base(instance, null)
             {
-                if (node == null) { throw new NullReferenceException("The node instance was null"); }
-                //if (node.Value != null)
-                //{
-                //    instance.MetaData.AddProperty(XMLTVConstants.Programs.ProgramDescription, node.Value);
-                //    xmltv_logger.Verbose.Debug.WriteLine("\tprogram_description: {0}", node.Value);
-                //}
+                if (node == null) { throw new NullReferenceException("The node instance was null"); }      
                 xmltv_logger.Verbose.Debug.WriteLine("Parsng unhandled extra meta-data: {0}", node.Name.ToString());
-
                 if (this.GetInstance() != null)
                 {
-                    if (!instance.MetaData.ContainsProperty(XMLTVConstants.Programs.ProgramExtraMetaData))
-                    {
-                        instance.MetaData.AddProperty(XMLTVConstants.Programs.ProgramExtraMetaData, null);
-                    }
+                    List<ExtraMetaData> list = new List<ExtraMetaData>();
+                    if (!instance.MetaData.ContainsProperty(XMLTVConstants.Programs.ProgramExtraMetaData)) { instance.MetaData.AddProperty(XMLTVConstants.Programs.ProgramExtraMetaData, new List<ExtraMetaData>()); }
+                    else { list = (List<ExtraMetaData>)instance.MetaData[XMLTVConstants.Programs.ProgramExtraMetaData]; }
+                    ExtraMetaData data = new ExtraMetaData(node);
+                    list.Add(data);
+                    instance.MetaData[XMLTVConstants.Programs.ProgramExtraMetaData] = list;
                 }
-
             }
         }
+       
         #endregion
         #endregion
     }

 

  ViewVC Help
Powered by ViewVC 1.1.22