xmltv not importing automatically (2 Viewers)

pilehave

Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    Hi

    Normally I use the EPG from my DVB-T, but lately one channel have had technical issues - so no EPG for that one.

    Fine, I'll just use XmlTV!

    I use WebGrabPlus+ and run it from Windows Task Scheduler, I run this bat file, that creates a new (temporary) XML-file, when done, it copies this to tvguide.xml. Easy peasy:

    Code:
    echo off
     
    REM grab tv channels
    if exist "C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv\tvguide.xml" DEL "C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv\tvguide.xml"
    START /D"C:\Program Files (x86)\ServerCare\WebGrab+PlusV1.1.0" /MIN /WAIT WebGrab+Plus.exe
    COPY "C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv\tmp_tvguide.xml" "C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv\tvguide.xml"

    One problem remains. TVServer won't import the file automatically:mad:

    If I press the manual import button, it works just fine.

    Logs? Sure, but they are useless. The only time XmlTV is mentioned, is when I enter Setup and fiddles around with the plugin:

    Code:
    2012-06-26 22:01:13.492164 [SetupTv(1)]: Loading all channels from the tvguide[s]
    2012-06-26 22:01:13.507764 [SetupTv(1)]: plugin:xmltv loading C:\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv\tvguide.xml
    2012-06-26 22:01:13.523364 [SetupTv(1)]: Loading all channels from the database

    Everything I can think of is configured correctly:

    xmltv_folder.jpgxmltv_config1.jpgxmltv_config2.jpg

    What the heck is going on? The file tvguide.xml is deleted in my bat-file, and then created again. So it cannot be some "file changed" date that is not changed.

    I suspect the plugin is broken...
     

    RonD

    Test Group
  • Team MediaPortal
  • December 20, 2011
    911
    278
    SillyValley CA
    Home Country
    United States of America United States of America
    have setup a windows scheduled task to run the batch file once a day? you can also use the PowerScheduler plugin to run your batch file. I use the following 3 line batch file to run mc2xml.exe and setup "PowerScheduler > EPG" to run my batch file once a day.

    c:
    cd “\ProgramData\Team MediaPortal\xmltv_test”
    mc2xml.exe -o tvguide.xml
     
    Last edited:

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #3
    The issue is not creating the tvguide.xml file, but getting tvserver to import it. The wiki says that tvserver watches the
    folder every minute and imports the file if it has changed. Except it doesn't.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #4
    The issue is not creating the tvguide.xml file, but getting tvserver to import it. The wiki says that tvserver watches the
    folder every minute and imports the file if it has changed. Except it doesn't.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #6
    Hmmm, stopped and started TVService again, and it does indeed seem like it fixed the issue. But I really wonder why this should be neccesary...
     

    RonD

    Test Group
  • Team MediaPortal
  • December 20, 2011
    911
    278
    SillyValley CA
    Home Country
    United States of America United States of America
    glad you have xmltv working. I had the same problem when I 1st used xmltv.

    Not sure what really goes on, but my guess is something like this. When you enable the plugin it enables the plugin configuration screens but the actual TV Server did not start/load the plugin. You do setup in the configuration screens, can do a manual tvguide.xml import, and think everything is working. When you restart the TV Server, it starts/loads all parts of the plugin and now xmltv monitors tvguide.xml. When I modify plugin settings I always stop/start the server. Each plugin seems to have different quirks.

    WebEGP, if you modify the grabber to add/change channels, you need to exit the TV Config program and restart TV Config to see the new/modified channels.

    PowerScheduler. If you change settings with TV Config, sometimes TV Server stop/restart uses the new settings, but it seems like I need to reboot to get all settings changed.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #8
    I think I'll add this little quirck to the Wiki, so others will not waste the same amount of time on something as easy to fix as this ;)

    Thanks for helping me out :)
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    One note about your batch file: it would be better to move/rename the file instead of copying it - copy can take some time if the file is large and wastes resources

    Rename in windows is essentially atomic (this is not true in *nix, where rename is link+unlink)
     

    RonD

    Test Group
  • Team MediaPortal
  • December 20, 2011
    911
    278
    SillyValley CA
    Home Country
    United States of America United States of America
    In the past I used windows scheduled task and a batch file to run mc2xml.exe and "copy xmltv.xml tvguide.xml". I did not see problems with this batch file approach.

    This version of the batch file uses the "-o tvguide.xml" option so mc2xml.exe writes to tvguide.xml without an extra copy or rename. I'm using PowerScheduler -> EPG to run this batch file. I have not seen any problems running mc2xml.exe/xmltv.

    Looking at the log files it looks like the xmltv plugin is paused when the batch file and mc2xml run. I removed a lot of noise entries from the log.

    2012-06-28 12:01:39.825804 [EPG Grabbing Handler(19)]: PowerScheduler: EPG schedule 12:1 is due: 12:1
    2012-06-28 12:01:39.841429 [EPG Grabbing Handler(19)]: EpgGrabbingHandler: Starting external command: G:\Ron\My Documents\MediaPortal\XMLTV\mc2xml.bat epg

    2012-06-28 12:02:02.591429 [EPG Grabbing Handler(19)]: EpgGrabbingHandler: External command finished
    2012-06-28 12:02:02.607054 [EPG Grabbing Handler(19)]: Controller: epg start

    2012-06-28 12:02:03.153929 [XmlTvImporter(20)]: plugin:xmltv importing G:\Ron\My Documents\MediaPortal\XMLTV\tvguide.xml
    2012-06-28 12:02:05.903929 [XmlTvImporter(20)]: xmltv import G:\Ron\My Documents\MediaPortal\XMLTV\tvguide.xml

    lots of xmltv import info

    2012-06-28 12:07:54.950804 [SQL EPG importer(9)]: schedule.SynchProgramStatesForAll
    2012-06-28 12:07:55.747679 [SQL EPG importer(9)]: BusinessLayer: InsertProgramsThread exiting
    2012-06-28 12:07:55.763304 [XmlTvImporter(20)]: plugin:xmltv import done
     

    Users who are viewing this thread

    Top Bottom