[Pending] XMLTVImport - fix import from http://xmltv.xmltv.se/ (1 Viewer)

hkjensen

MP Donator
  • Premium Supporter
  • June 11, 2007
    165
    65
    Copenhagen
    Home Country
    Denmark Denmark
    Hi

    TV guide data from xmltv.xmltv.se contains <episode-num system="thetvdb.com"></episode-num> witch can't be processed by the plugin resulting in zero program are imported :-(

    With attached patch to TvEngine3/TVLibrary/Plugins/XmlTvImport/XMLTVImport.cs the plugin only reads episodenum with system equals "xmltv_ns" or "onscreen"
     

    Attachments

    • XMLTVImport.zip
      495 bytes

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello :)

    Thank you for the patch. Unfortunately I think we have to reject it. Some people are getting episode numbers from systems other than xmltv_ns and onscreen. If we accepted this patch those people would lose their episode numbers.

    Maybe a better way would be to enable the code to skip/ignore or handle the empty tvdb episode-num tags.
     

    Peter Kjellerstedt

    Portal Member
    January 12, 2013
    7
    1
    51
    Lund, Sweden
    Home Country
    Sweden Sweden
    This definitely needs to be fixed, one way or another. I have been using a similar solution (attached). If it finds an xmltv_ns episode number, it will prioritize and use that, otherwise it will use the first episode number it finds as before.

    And for the record, the thetvdb.com episode numbers are not empty in the xml file, they are just not usable with MediaPortal...
     

    Attachments

    • 0001-Prefer-the-xmltv_ns-episode-number-system.patch
      1.2 KB

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    And for the record, the thetvdb.com episode numbers are not empty in the xml file, they are just not usable with MediaPortal...
    Can you please supply a full <programme> example which includes a non-empty thetvdb.com episode number?
     

    Peter Kjellerstedt

    Portal Member
    January 12, 2013
    7
    1
    51
    Lund, Sweden
    Home Country
    Sweden Sweden
    And for the record, the thetvdb.com episode numbers are not empty in the xml file, they are just not usable with MediaPortal...
    Can you please supply a full <programme> example which includes a non-empty thetvdb.com episode number?

    This is a typical entry:

    Code:
    <programme channel="animalplanet.discovery.eu" start="20160604040200 +0200" stop="20160604044900 +0200">
      <category lang="en">Reality</category>
      <category lang="en">series</category>
      <date>2013</date>
      <desc lang="en">A silver maple is used as the base for a cedar-shingled structure with a curved turret two stories high and a deck with views of Lake Chelan.</desc>
      <episode-num system="onscreen">Episode 3 season 4</episode-num>
      <episode-num system="thetvdb.com">series/270071</episode-num>
      <episode-num system="xmltv_ns">3 . 2 .</episode-num>
      <sub-title lang="en">Mindbending Silver Maple</sub-title>
      <title lang="en">Treehouse Masters</title>
      <url>http://thetvdb.com/?tab=episode&amp;seriesid=270071&amp;seasonid=627205&amp;id=5277168&amp;lid=7</url>
    </programme>

    I think the best would be to give the various episode systems priorities based on what is most useful for MediaPortal, e.g., xmltv_ns > onscreen > anything else. My patch prioritizes only xmltv_ns since I know my data always contains it somewhere, but the patch could easily be extended to also give priorities to other systems, like onscreen.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    This is a typical entry...
    Thanks. :)
    The TVDB page for the corresponding series is:
    http://thetvdb.com/index.php?tab=series&id=270071&lid=7

    So, it looks like that particular format conveys the series ID. That can be useful for meta-data lookup and obtaining the actual season and episode details.

    Do you have any examples where the first part is not "series/"?

    I think the best would be to give the various episode systems priorities based on what is most useful for MediaPortal, e.g., xmltv_ns > onscreen > anything else. My patch prioritizes only xmltv_ns...
    I agree, and that's why I wouldn't be in favour of including your current patch.
     

    Peter Kjellerstedt

    Portal Member
    January 12, 2013
    7
    1
    51
    Lund, Sweden
    Home Country
    Sweden Sweden
    Thanks. :)
    The TVDB page for the corresponding series is:
    http://thetvdb.com/index.php?tab=series&id=270071&lid=7

    So, it looks like that particular format conveys the series ID. That can be useful for meta-data lookup and obtaining the actual season and episode details.

    Well, the actual URL to the thetvdb.com page for the episode is in the <url> tag. However, I am not sure how useful it would be to try to do a lookup based on only what is in the <episode-num> tag for thetvdb.com, as it only contains the series id, and nothing about the actual season and episode.

    Do you have any examples where the first part is not "series/"?

    No. The XML data from http://xmltv.xmltv.se/ only contains that format for thetvdb.com <episode-num> tags.

    I think the best would be to give the various episode systems priorities based on what is most useful for MediaPortal, e.g., xmltv_ns > onscreen > anything else. My patch prioritizes only xmltv_ns...
    I agree, and that's why I wouldn't be in favour of including your current patch.

    I can extend the patch to handle onscreen in addition to xmltv_ns. Are there other episode-num formats that MediaPortal can actually make use of? Otherwise, that should be enough to make better use of the input data while still maintaining the old functionality.
     

    hkjensen

    MP Donator
  • Premium Supporter
  • June 11, 2007
    165
    65
    Copenhagen
    Home Country
    Denmark Denmark
    Hi

    I have created a new patch, where system for episodenum can be selected, if no selected is made, episodenum is read from first available episodenum element (current behavior)

    I have attache a screen dump of setup (plugin->XmlTv)

    Definitions of imports:
    - first: Load epsioden umber from first element (current behavior and default selection)
    - onscreen: Load episode number from element with system="onscreen"
    - xmltv_ns: Load episode number from element with system="xmltv_ns"
    - not defined: load episode number from element with system not defined ex: <episode-num>episode 1 of 2 </episode-num>
    if episode number is not found for "onscreen","xmltv_ns" or "not defined" first element is used

    If the described functionality can be accepted I will submit the patch (currently testing)
     

    Attachments

    • xmlTvImport.png
      xmlTvImport.png
      175.2 KB
    • XmlTvImport.zip
      32.5 KB
    Last edited:

    Users who are viewing this thread

    Top Bottom