[Pending] - XMLTVImport - fix import from http://xmltv.xmltv.se/

Discussion in 'Submit: code patches (MediaPortal/TV-Server/etc.)' started by hkjensen, November 10, 2015.

Tags:
  1. hkjensen
    • Premium Supporter

    hkjensen MP Donator

    Joined:
    June 11, 2007
    Messages:
    164
    Likes Received:
    47
    Location:
    Copenhagen
    Ratings:
    +63 / 0
    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"


     

    Attached Files:

    • XMLTVImport.zip
      File size:
      495 bytes
      Uploaded:
      November 10, 2015
      Views:
      151
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    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.
     
  4. Peter Kjellerstedt

    Peter Kjellerstedt Portal Member

    Joined:
    January 12, 2013
    Messages:
    7
    Likes Received:
    0
    Gender:
    Male
    Location:
    Lund, Sweden
    Ratings:
    +1 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    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...
     

    Attached Files:

  5. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    Can you please supply a full <programme> example which includes a non-empty thetvdb.com episode number?
     
  6. Peter Kjellerstedt

    Peter Kjellerstedt Portal Member

    Joined:
    January 12, 2013
    Messages:
    7
    Likes Received:
    0
    Gender:
    Male
    Location:
    Lund, Sweden
    Ratings:
    +1 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    This is a typical entry:

    Code (Text):
    1.  
    2. <programme channel="animalplanet.discovery.eu" start="20160604040200 +0200" stop="20160604044900 +0200">
    3.   <category lang="en">Reality</category>
    4.   <category lang="en">series</category>
    5.   <date>2013</date>
    6.   <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>
    7.   <episode-num system="onscreen">Episode 3 season 4</episode-num>
    8.   <episode-num system="thetvdb.com">series/270071</episode-num>
    9.   <episode-num system="xmltv_ns">3 . 2 .</episode-num>
    10.   <sub-title lang="en">Mindbending Silver Maple</sub-title>
    11.   <title lang="en">Treehouse Masters</title>
    12.   <url>http://thetvdb.com/?tab=episode&amp;seriesid=270071&amp;seasonid=627205&amp;id=5277168&amp;lid=7</url>
    13. </programme>
    14.  
    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.
     
  7. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    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 agree, and that's why I wouldn't be in favour of including your current patch.
     
  8. Peter Kjellerstedt

    Peter Kjellerstedt Portal Member

    Joined:
    January 12, 2013
    Messages:
    7
    Likes Received:
    0
    Gender:
    Male
    Location:
    Lund, Sweden
    Ratings:
    +1 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    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.

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

    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.
     
  9. hkjensen
    • Premium Supporter

    hkjensen MP Donator

    Joined:
    June 11, 2007
    Messages:
    164
    Likes Received:
    47
    Location:
    Copenhagen
    Ratings:
    +63 / 0
    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)
     

    Attached Files:

    Last edited: July 18, 2016
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!