Tools and other software Episodes2TVGuide (E2T) - Customizing tvguide.xml (2 Viewers)

breese

Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    65
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    So I ran the new English version... Looked good until I did a check for one show "Mork & Mindy" I have been using this to test with.
    Anyways.

    The episode numbers change.... and the new file is smaller.

    tvguide.xml
    <programme start="20160302160000 -0600" stop="20160302163000 -0600" channel="I31044.labs.zap2it.com">
    <title lang="en">Mork &amp; Mindy</title>
    <sub-title lang="en">Midas Mork</sub-title>
    <desc lang="en">Mork can make gold from polyester.</desc>
    <episode-num system="dd_progid">EP00002953.0089</episode-num>
    <previously-shown />
    </programme>
    <programme start="20160302163000 -0600" stop="20160302170000 -0600" channel="I31044.labs.zap2it.com">
    <title lang="en">Mork &amp; Mindy</title>
    <sub-title lang="en">Cheerleader in Chains</sub-title>
    <desc lang="en">Mindy is jailed for protecting a source.</desc>
    <episode-num system="dd_progid">EP00002953.0090</episode-num>
    <previously-shown />
    </programme>


    <programme start="20160303160000 -0600" stop="20160303163000 -0600" channel="I31044.labs.zap2it.com">
    <title lang="en">Mork &amp; Mindy</title>
    <sub-title lang="en">Gotta Run</sub-title>
    <desc lang="en">Mork meets a half-Neptunian couple.</desc>
    <episode-num system="dd_progid">EP00002953.0093</episode-num>
    <previously-shown />
    </programme>
    <programme start="20160303163000 -0600" stop="20160303170000 -0600" channel="I31044.labs.zap2it.com">
    <title lang="en">Mork &amp; Mindy</title>
    <sub-title lang="en">Gotta Run</sub-title>
    <desc lang="en">The family flees evil Neptunian Kalnik.</desc>
    <episode-num system="dd_progid">EP00002953.0094</episode-num>
    <previously-shown />
    </programme>


    tvguide-new.xml

    <programme start="20160302160000 -0600" stop="20160302163000 -0600" channel="I31044.labs.zap2it.com">
    <title lang="en">Mork &amp; Mindy</title>
    <sub-title lang="en">Midas Mork</sub-title>
    <desc lang="en">Mork can make gold from polyester.</desc>
    <episode-num system="xmltv_ns">3.16.</episode-num>
    <previously-shown />
    </programme>
    <programme start="20160302163000 -0600" stop="20160302170000 -0600" channel="I31044.labs.zap2it.com">
    <title lang="en">Mork &amp; Mindy</title>
    <sub-title lang="en">Cheerleader in Chains</sub-title>
    <desc lang="en">Mindy is jailed for protecting a source.</desc>
    <episode-num system="dd_progid">EP00002953.0090</episode-num>
    <previously-shown />
    </programme>


    <programme start="20160303160000 -0600" stop="20160303163000 -0600" channel="I31044.labs.zap2it.com">
    <title lang="en">Mork &amp; Mindy</title>
    <sub-title lang="en">Gotta Run</sub-title>
    <desc lang="en">Mork meets a half-Neptunian couple.</desc>
    <episode-num system="xmltv_ns">3.18.</episode-num>
    <previously-shown />
    </programme>
    <programme start="20160303163000 -0600" stop="20160303170000 -0600" channel="I31044.labs.zap2it.com">
    <title lang="en">Mork &amp; Mindy</title>
    <sub-title lang="en">Gotta Run</sub-title>
    <desc lang="en">The family flees evil Neptunian Kalnik.</desc>
    <episode-num system="xmltv_ns">3.18.</episode-num>
    <previously-shown />
    </programme>


     

    Attachments

    • tvguide-new.xml
      1.8 MB

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,553
    3,934
    Lehmden
    Home Country
    Germany Germany
    Hi.
    The episode numbers change...
    This is one of the main goals of E2T as most EPG sources did not have proper (or any) episodes numbering...
    As example here is an entry from the output of WebGrab++:
    XML:
      <programme start="20160304013000 +0100" stop="20160304030000 +0100" channel="DE ZDF HD">
        <title lang="de">Camilla Läckberg: Mord in Fjällbacka</title>
        <sub-title lang="de">Die Kunst des Todes</sub-title>
        <desc lang="de">Erica und ihr Mann Patrik erhalten Besuch von Ericas jüngerer Schwester Anna. Beide ermitteln, als Anna ihre Freundin Linda Hamrin tot in ihrem Auto auffindet.</desc>
        <date>2013</date>
        <category lang="de">Thriller</category>
        <category lang="de">Krimi</category>
        <category lang="de">TV-Serien</category>
        <icon src="http://static.timefor.tv/imgs/print_img.php?sti=imgs/epg/channel/2016-03-03/527780b2c2aa6.jpg&amp;height=230&amp;width=300" />
      </programme>
    There is no episodes numbering and not even the name of the series is correct (had to be "The Fjällbacka Murders" or in German "Mord in Fjällbacka", original title is "Fjallbackamorden" as it is a Swedish series). That's why I had to add this series manually to the Episodes2TVGuide.ID.xml...

    And that is, what E2T is making out of it:
    XML:
      <programme start="20160304013000 +0100" stop="20160304030000 +0100" channel="DE ZDF HD">
        <title lang="de">Camilla Läckberg: Mord in Fjällbacka</title>
        <sub-title lang="de">Die Kunst des Todes</sub-title>
        <desc lang="de">Erica und ihr Mann Patrik erhalten Besuch von Ericas jüngerer Schwester Anna. Sie ist gerade als Maklerin unterwegs und will das Elternhaus von Hasse Wennerman und seiner Schwester Anita an den Mann bringen. Die beiden verkaufen zudem alte Möbel und Kunstobjekte ihrer Eltern und bitten deshalb die Kunstexpertin Britta Bergmark, den Wert eines alten Gemäldes zu bestimmen. Britta bezeichnet das Bild allerdings als wertlos. Anna findet unterdessen ihre Freundin Linda Hamrin bewusstlos hinter dem Lenkrad ihres Autos. Alle Türen sind verriegelt, und so tippt man zunächst auf einen Suizidversuch. Doch als Erica Lindas Autoschlüssel auf dem Parkplatz findet, ist klar, dass jemand versucht hat, die junge Frau zu ermorden. Erica und Patrik finden heraus, dass die verheiratete Linda eine Affäre mit Hasse Wennerman hatte und zudem pikante Details zum wahren Wert der alten Kunstobjekte kannte.</desc>
        <date>2013</date>
        <category lang="de">Thriller</category>
        <category lang="de">Krimi</category>
        <category lang="de">TV-Serien</category>
        <icon src="http://static.timefor.tv/imgs/print_img.php?sti=imgs/epg/channel/2016-03-03/527780b2c2aa6.jpg&amp;height=230&amp;width=300" />
        <episode-num system="xmltv_ns">0.1.</episode-num>
      </programme>
    Now I have full blown description and proper season and episodes numbers exactly as I want...


    <episode-num system="dd_progid">
    This is something MP did not understand also it is xmltv compliant too. That's why it is not displayed in EPG. The only properly recognized format for episodes numbering is:
    <episode-num system="xmltv_ns">
    (NS stands for "Numbering System"). That's why E2T is using this numbering scheme.
    To be honest, I never have seen a xmltv file with dd_progid before...

    The numbers from xmltv_ns are zero based so 3.16 is for Season 4 Episode 17 (Midas Mork) and that is how it will be displayed in MP's EPG "Mork & Mindy (4.17 - Midas Mork)" and used for naming of recurring recordings. And this also is used to grab metadata from TVDB...

    If you want to replace the descriptions (plot) of the episodes with the descriptions from TVDB too, you must set the corresponding option in Episodes2TVGuide.xml from "false" to "true".... This is useful if your EPG source did not deliver good quality of description data. Here in Germany the description often is one sentence only, but on TVDB there is lot more to find. That's why I have the option TVDB_OverwritePlot set to "true"...
     

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    65
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    This is working...
    I modified my scheduler to run a bat file. This also allows me to run it anytime I choose to.

    As you can see, not only does the recording have the S#E# in it, the description is the long version... Nice.
     

    Attachments

    • Mork & Mindy - S4E17 - Midas Mork.xml
      1.2 KB
    • TVGuideBat.zip
      256 bytes

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    65
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    Question:
    Does it matter to MP2 if the xml containes UTF-8 or ISO-8859-1 ?
    I ask because I found out the zap2xml I am using has been updated to now use TVGuide.com and include Series info.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,553
    3,934
    Lehmden
    Home Country
    Germany Germany
    Hi.
    New version 0.16.71 in first post.

    Changelog:
    • All messages now should be in English
    • While downloading series metadata sometimes there was an error. This should be fixed now.
    • When finished working E2T now displays (in seconds) how long it has been working.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,553
    3,934
    Lehmden
    Home Country
    Germany Germany
    Hi.
    New version 0.16.73 in first post.

    Changelog:
    • All illegal characters in TVDB descriptions are removed now.

    It leads to a crash in previous E2T versions if such illegal chars are found...
     

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    65
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    I have replaced the file with the new one and finally found some time to look at the file.

    I have figured out I can run my batch file and send the output to a log.txt for you to see (included here).

    Sense switching over to TVGuide.com (it includes Series info), and running your application, some interesting things to note.

    When I do the xmltv guide pull, I save it to a file called guide.xml
    Then I run your application and create the final file called TVGuide.xml
    Script looks like this

    f:\tvguide\zap2xml.exe -zajgFU -C f:\tvguide\zap2xmlrc.txt
    f:\TVGuide\episodes2TVGuide.exe --input:"f:\TVGuide\guide.xml" --output:"f:\TVGuide\tvguide.xml"

    Now the first line gives me the guide.xml and includes info like

    <programme start="20160313230000 -0500" stop="20160314000000 -0500" channel="I2.1.11751.tvguide.com">
    <title lang="en">Blue Bloods</title>
    <sub-title lang="en">Through the Looking Glass</sub-title>
    <desc lang="en">Frank spars with a journalist who protects her source at all costs, even though the source admits to being a killer. Elsewhere, Danny participates in an NYPD program that requires him to mentor a troubled teen.</desc>
    <date>20150402</date>
    <category lang="en">Series</category>
    <url>http://www.tvguide.com/tvshows/blue...ason-5/through-the-looking-glass/303333</url>
    <episode-num system="common">S05E19</episode-num>
    <episode-num system="xmltv_ns">4.18.</episode-num>
    <previously-shown start="20150402000000" />
    <rating>
    <value>TV-14@LV</value>
    </rating>
    </programme>


    When I run this file thru your application, I get this (the episode-num system="common line is replaced)
    Would it not be better to have the S##E## ?

    <programme start="20160313230000 -0500" stop="20160314000000 -0500" channel="I2.1.11751.tvguide.com">
    <title lang="en">Blue Bloods</title>
    <sub-title lang="en">Through the Looking Glass</sub-title>
    <desc lang="en">Frank spars with a journalist who protects her source at all costs, even though the source admits to being a killer. Elsewhere, Danny participates in an NYPD program that requires him to mentor a troubled teen.</desc>
    <date>20150402</date>
    <category lang="en">Series</category>
    <url>http://www.tvguide.com/tvshows/blue...ason-5/through-the-looking-glass/303333</url>
    <episode-num system="xmltv_ns">4.18.</episode-num>
    <episode-num system="xmltv_ns">4.18.</episode-num>
    <previously-shown start="20150402000000" />
    </programme>
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,553
    3,934
    Lehmden
    Home Country
    Germany Germany
    Hi.
    The episode-num system="common" is obsolete regarding to the xmltv specs and it is removed from most plugins/apps that can make use of xmltv. MP for example only can use the episode-num system="xmltv_ns" so it did not matter at all if the old one is in the file or not.
    Also the old version is better readable by humans the new one is easier to read by computer. That's why it is not longer supported as in general those XML files are meant for usage by computer not by humans... The information itself is identical.
     

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Hi there,

    I thought I would give this utility a try.

    It was running fine (got to about 9.5%), then crashed with an error :(

    J.

    ps - The file isn't actually present in the cache
     

    Attachments

    • E2TVG.jpg
      E2TVG.jpg
      188.9 KB

    Users who are viewing this thread

    Top Bottom