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: 1157561" data-attributes="member: 155771"><p>While we're on the subject of oversight in the code, I also noticed that the switch statement in TVEngine.XMLTVImport.Import() is parsing the <previously-shown> tag in the <programme> block, but not doing anything with it.</p><p></p><p>Also, could the option be added to concatenate multiple <category> tags instead of just parsing the first and dropping the rest? You could add the option for the user to set a concatenation string (which the code would set the value of the <span style="font-family: 'Courier New'">catSep</span> string to before the main parsing loop begins), and then change the code in the switch statement to something like this:</p><p></p><p><span style="font-family: 'Courier New'">case "category":</span></p><p><span style="font-family: 'Courier New'"> if (nodeCategory == null) nodeCategory = xmlProg.ReadString();</span></p><p><span style="font-family: 'Courier New'"> else if (catSep != null) nodeCategory = string.Concat(nodeCategory, catSep, xmlProg.ReadString());</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 ask because sometimes the XmlTv file can divide the category up between multiple category tags, and the first category tag isn't enough information to properly translate the category in the Kodi MediaPortal PVR add-on for genre coloration and other things that use the genre information. For instance, in the XmlTv files retrieved by mc2xml, I sometimes get category tags like this:</p><p></p><p><span style="font-family: 'Courier New'"><category lang="en">Other</category></span></p><p><span style="font-family: 'Courier New'"><category lang="en">comedy</category></span></p><p></p><p>or like this:</p><p></p><p><span style="font-family: 'Courier New'"><category lang="en">Other</category></span></p><p><span style="font-family: 'Courier New'"><category lang="en">action/adventure</category></span></p><p></p><p>You get the idea. I apologize if this is starting to veer off from the original topic of this thread, and if necessary I can make this request in a separate thread. I just thought of this request while I was continuing to look over the code for the XmlTv parsing plugin for MediaPortal, as well as the latest XmlTv file that mc2xml downloaded to see examples of what the code parses.</p></blockquote><p></p>
[QUOTE="ChaosMageX, post: 1157561, member: 155771"] While we're on the subject of oversight in the code, I also noticed that the switch statement in TVEngine.XMLTVImport.Import() is parsing the <previously-shown> tag in the <programme> block, but not doing anything with it. Also, could the option be added to concatenate multiple <category> tags instead of just parsing the first and dropping the rest? You could add the option for the user to set a concatenation string (which the code would set the value of the [FONT=Courier New]catSep[/FONT] string to before the main parsing loop begins), and then change the code in the switch statement to something like this: [FONT=Courier New]case "category": if (nodeCategory == null) nodeCategory = xmlProg.ReadString(); else if (catSep != null) nodeCategory = string.Concat(nodeCategory, catSep, xmlProg.ReadString()); else xmlProg.Skip(); break;[/FONT] I ask because sometimes the XmlTv file can divide the category up between multiple category tags, and the first category tag isn't enough information to properly translate the category in the Kodi MediaPortal PVR add-on for genre coloration and other things that use the genre information. For instance, in the XmlTv files retrieved by mc2xml, I sometimes get category tags like this: [FONT=Courier New]<category lang="en">Other</category> <category lang="en">comedy</category>[/FONT] or like this: [FONT=Courier New]<category lang="en">Other</category> <category lang="en">action/adventure</category>[/FONT] You get the idea. I apologize if this is starting to veer off from the original topic of this thread, and if necessary I can make this request in a separate thread. I just thought of this request while I was continuing to look over the code for the XmlTv parsing plugin for MediaPortal, as well as the latest XmlTv file that mc2xml downloaded to see examples of what the code parses. [/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