XmlTV PLugin : import fail if <episodenum> is an empty string (1 Viewer)

Smeulf

Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    Home Country
    France France
    Hi everyone,

    One of the french most used XmlTV web provider made an update in is site.

    Since then, the website provides an <episodenum> tag for every program, even if it is empty.

    To wait for an update, i compiled and submited a patched plugin, without guarantie but successfully tested on MP 1.1.1 and 1.1.2 (see post https://forum.team-mediaportal.com/...-le-serveur-tele-79250/index7.html#post695255 in french, sorry)

    Please find joined sample TVGuide that contains the empty <episodenum> tag.

    My patched code (verry little patch by the way) :

    In XMLTVImports.cs (around line 612 in the version I had), underline is the modified code :

    Code:
    if (nodeEpisodeNum != null [U]&& nodeEpisodeNum != ""[/U])
                      {
                        if (nodeEpisodeNumSystem != null)
                        {
                          // http://xml.coverpages.org/XMLTV-DTD-20021210.html
                          if (nodeEpisodeNumSystem == "xmltv_ns")
                          {
                            serEpNum = ConvertHTMLToAnsi(nodeEpisodeNum.Replace(" ", ""));
                            int dot1 = serEpNum.IndexOf(".", 0);
                            int dot2 = serEpNum.IndexOf(".", dot1 + 1);

    Cheers.

    [Edit] Can you provide the right fix before the next version ? I mean, i'm not sure of my build, so I would prefer you to post the right fixed plugin. Tks in advance.

    [Edit 2] MP Version = 1.1.1 & 1.1.2
     

    Users who are viewing this thread

    Top Bottom