home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Products
TV-Server
XmlTV: Parse the <new /> tag to obtain air date when <date> tag is missing?
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="ChaosMageX" data-source="post: 1157534" data-attributes="member: 155771"><p>I would like support for parsing the <new /> tag in <programme> blocks in XmlTV EPG data in order to set the original air date meta-data for a program when that program's <programme> block does not have a <date> tag.</p><p></p><p>I believe this could be easily achieved by simply adding the following code to the switch block that parses XmlTV tags in the TVEngine.XMLTVImport.Import() function, around lines 430 to 490 in <a href="https://github.com/MediaPortal/MediaPortal-1/blob/master/TvEngine3/TVLibrary/Plugins/XmlTvImport/XMLTVImport.cs" target="_blank">XMLTVImport.cs</a></p><p></p><p><span style="font-family: 'Courier New'">case "new":</span></p><p><span style="font-family: 'Courier New'"> if (nodeDate == null && nodeStart != null && nodeStart.Length > 7) nodeDate = nodeStart.Substring(0, 8);</span></p><p><span style="font-family: 'Courier New'"> else xmlProg.Skip();</span></p><p><span style="font-family: 'Courier New'"> break;</span></p><p></p><p>I haven't tried testing this code myself, but in theory it should work. In the case that the <programme> block contains both a <date> tag and a <new /> tag, the <date> tag would override the <new /> or vice-versa, depending on which comes first. </p><p></p><p>In my experience looking over XmlTV files obtained by mc2xml, the <new /> tag always seems to be the very last tag in the <programme> block whenever the program is new, and when it is there, the <date> tag is missing, and hence the original air date of many programs is often missing from the EPG data, a critical piece of data needed for setting automated recordings of new episodes of TV shows, and being able to visually determine whether an episode is new when manually scheduling recordings.</p></blockquote><p></p>
[QUOTE="ChaosMageX, post: 1157534, member: 155771"] I would like support for parsing the <new /> tag in <programme> blocks in XmlTV EPG data in order to set the original air date meta-data for a program when that program's <programme> block does not have a <date> tag. I believe this could be easily achieved by simply adding the following code to the switch block that parses XmlTV tags in the TVEngine.XMLTVImport.Import() function, around lines 430 to 490 in [URL='https://github.com/MediaPortal/MediaPortal-1/blob/master/TvEngine3/TVLibrary/Plugins/XmlTvImport/XMLTVImport.cs']XMLTVImport.cs[/URL] [FONT=Courier New]case "new": if (nodeDate == null && nodeStart != null && nodeStart.Length > 7) nodeDate = nodeStart.Substring(0, 8); else xmlProg.Skip(); break;[/FONT] I haven't tried testing this code myself, but in theory it should work. In the case that the <programme> block contains both a <date> tag and a <new /> tag, the <date> tag would override the <new /> or vice-versa, depending on which comes first. In my experience looking over XmlTV files obtained by mc2xml, the <new /> tag always seems to be the very last tag in the <programme> block whenever the program is new, and when it is there, the <date> tag is missing, and hence the original air date of many programs is often missing from the EPG data, a critical piece of data needed for setting automated recordings of new episodes of TV shows, and being able to visually determine whether an episode is new when manually scheduling recordings. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Products
TV-Server
XmlTV: Parse the <new /> tag to obtain air date when <date> tag is missing?
Contact us
RSS
Top
Bottom