Idea: avoid import of defective TvGuide.xml files (1 Viewer)

nino

Portal Member
October 29, 2007
33
1
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.
 

mmg3k

Portal Member
August 24, 2005
16
0
France
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
 

nino

Portal Member
October 29, 2007
33
1
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.
 

revs

MP Donator
  • Premium Supporter
  • February 1, 2007
    1,274
    72
    The Sauce of Worcester
    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.
     

    benjerry

    MP Donator
  • Premium Supporter
  • September 26, 2007
    167
    10
    Home Country
    Netherlands Netherlands
    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.

    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.
     

    revs

    MP Donator
  • Premium Supporter
  • February 1, 2007
    1,274
    72
    The Sauce of Worcester
    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.
     

    nino

    Portal Member
    October 29, 2007
    33
    1
    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.
     

    Users who are viewing this thread

    Top Bottom