Idea: avoid import of defective TvGuide.xml files

Discussion in 'xmlTV' started by nino, October 8, 2008.

  1. nino

    nino Portal Member

    Joined:
    October 29, 2007
    Messages:
    33
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Germany Germany
    Hi,

    Sometimes the TvGuide.xml is corrupted or empty if the internet connection was down or if the tvinfo/tvtoday/... site was down while WebEpg tried to update. XmlTv imports the corrupted TvGuide.xml anyway resulting in empty EPG data.



    In order not to lose previously imported EPG data in such a case it would be nice to if XmlTv avoided importing defective TvGuide.xml files. An easy (?) solution would be a configuration option for a minimum file size for TvGuide.xml. XmlTv could then skip a potential import if TVGuide.xml is smaller than this size.

    Does this make sense and would it be possible to add such a feature?


    Thanks a lot!

    nino.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. mmg3k

    mmg3k Portal Member

    Joined:
    August 24, 2005
    Messages:
    16
    Likes Received:
    0
    Occupation:
    IT
    Location:
    France
    Ratings:
    +0 / 0
    Home Country:
    France France
    Hi there,

    I like the idea of clearing the old TV stuff in the DB. Another way would to import without clearing the existing and if it is successfull then redo it but this time clearing the existing. Even better would be checking teh consistancy of the XMLTV before importing...

    Martin
     
  4. nino

    nino Portal Member

    Joined:
    October 29, 2007
    Messages:
    33
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Germany Germany
    I found a simple solution:
    Let XmlTV import TVGuide.xml from somewhere else than ...\Team MediaPortal\MediaPortal\xmltv\TVguide.xml and run a a simple batch script as a windows task which only copies a TVGuide.xml (written by WebEPG) to that place if it is large enough.
    I'm quite happy with this as it mantains a valid EPG when an WebEPG update failed.
     
  5. revs
    • Premium Supporter

    revs MP Donator

    Joined:
    February 1, 2007
    Messages:
    1,274
    Likes Received:
    72
    Occupation:
    Software Developer
    Location:
    The Sauce of Worcester
    Ratings:
    +72 / 0
    Home Country:
    Wales Wales
    I have a DOS batch file that runs the xml file against a validator. If invalid, then the file is rejected/downloaded again. I'll post later if i remember.
     
  6. benjerry
    • Premium Supporter

    benjerry MP Donator

    Joined:
    September 26, 2007
    Messages:
    167
    Likes Received:
    10
    Ratings:
    +10 / 0
    Home Country:
    Netherlands Netherlands
    Hi there. I would be very much interested in your batch file as I would like to incorporate it in my current scripts, based on mc2xml.

    I included my personal grabbing sollution in the attachment. I don't know if I re-invented the wheel, but perhaps usefull.
     
  7. revs
    • Premium Supporter

    revs MP Donator

    Joined:
    February 1, 2007
    Messages:
    1,274
    Likes Received:
    72
    Occupation:
    Software Developer
    Location:
    The Sauce of Worcester
    Ratings:
    +72 / 0
    Home Country:
    Wales Wales
    I updated my version of xmltv yesterday (as channels started to go missing) and that has broken my xml validation process. If I get it working again then i'll post it. However xmltv seems to do a much better job at downloading the listings successfully now, so i may not even need the validation.
     
  8. nino

    nino Portal Member

    Joined:
    October 29, 2007
    Messages:
    33
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Germany Germany
    Hi -

    Is it be possible to detect by xml validation of TvGuide.xml that no or only incomplete guide data has been downloaded (for example because the tvinfo or tvtoday site was down)?
    Or would the resulting TvGuide.xml file be valid (even though very small)?

    Cheers,

    nino.
     
  9. revs
    • Premium Supporter

    revs MP Donator

    Joined:
    February 1, 2007
    Messages:
    1,274
    Likes Received:
    72
    Occupation:
    Software Developer
    Location:
    The Sauce of Worcester
    Ratings:
    +72 / 0
    Home Country:
    Wales Wales
    hi nino, in theory you could run a xml validator against the file - this is what i used to do before the update of xmltv broke my program.
     
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!