Stay Awake Whilst Loading EPG (1 Viewer)

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    I have created a scheduled task on my PC to wake the machine at 5am and run XMLTVGUI to grab listings. This is fine and works ok. It appears that the XMLTV pluging then picks up the changed xml file and starts to process it.

    The problem I have is that powerscheduler is set to timeout after 10 mins. I am sometimes loosing EPG data as it looks like the delete of old data happens but before all the new data can be loaded the machine times out and goes to sleep.

    I am guessing all the EPG settings in powerscheduler plugin relate to DVB EPG grabbing? Is there any way of stopping the machine going to sleep whilst it is in the middle of loading a file?
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    Have you added XMLTVGUI to the list of processes that prevent PowerScheduler from going to sleep?
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Have you added XMLTVGUI to the list of processes that prevent PowerScheduler from going to sleep?

    No but XMLTVGUI has finished doing its job (the last step is to write out the XML). It only takes a couple of minutes. The problem is after that when TVServer identifies that the xmltv file has been updated and deletes from the database and then imports file. It is going to sleep at this point
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    Then it must be a PowerScheduler issue, as XMLTV importer prevents suspend before doing anything else. Maybe it is related to another problem reported about TV Server not waking up for recordings. I have to check.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Then it must be a PowerScheduler issue, as XMLTV importer prevents suspend before doing anything else. Maybe it is related to another problem reported about TV Server not waking up for recordings. I have to check.
    I am wondering whether it is because I am not using PowerScheduler to wake the machine I am using a scheduled task?

    Does anything need to be setup to get the xmltv plugin to register itself with the powerscheduler plugin?
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    I had a look at the code and I was wrong: XmlTv will delete all programs, then start a new background thread to import tvguide.xml. It is within this new thread that it tells PowerScheduler to stay awake, so in some cases it is possible that program will get deleted and the the system will go to sleep before importing the new ones.

    In general you it is not a good idea to use Windows Scheduler to wake up the PC, it doesn't work very well with PowerScheduler. Also you should always left PowerScheduler put the PC to sleep.

    XmlTV will register itself with PowerScheduler as long as it is enabled, nothing more is needed.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    I had a look at the code and I was wrong: XmlTv will delete all programs, then start a new background thread to import tvguide.xml. It is within this new thread that it tells PowerScheduler to stay awake, so in some cases it is possible that program will get deleted and the the system will go to sleep before importing the new ones.
    Is this on a per channel basis or across everything? What I see in the guide is some channels with no data at all and some with the full 14 days worth of data. This morning I had this and the channels with missing data all seem to be the ones towards the end of the xmltv file. I am fairly sure the xmltv file is valid as previously just forcing an import via the config app has populated the guide for the missing channels but I did not have enough time to run this before I left for work (will check tonight)

    In general you it is not a good idea to use Windows Scheduler to wake up the PC, it doesn't work very well with PowerScheduler. Also you should always left PowerScheduler put the PC to sleep.
    But I need to run a script to create the xmltv file. Is there a way of doing this without using windows scheduler then? Going to sleep is all handled via powerscheduler,
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    Is this on a per channel basis or across everything? What I see in the guide is some channels with no data at all and some with the full 14 days worth of data. This morning I had this and the channels with missing data all seem to be the ones towards the end of the xmltv file. I am fairly sure the xmltv file is valid as previously just forcing an import via the config app has populated the guide for the missing channels but I did not have enough time to run this before I left for work (will check tonight)
    It deletes everything (even for channels not mapped to xmltv). That is why it does not work with DVB EPG. Sad but true:(. But if you are left with some channels populated and some empty, then there's more to it. And even with this problem, as soon as the system wakes up (probably manually since there won't be any schedules to record), xmltv should resume and import the new tvguide.

    But I need to run a script to create the xmltv file. Is there a way of doing this without using windows scheduler then? Going to sleep is all handled via powerscheduler,
    Yes, I know. This is a shortcoming that has been pointed out many times in the forums. One way to run the script is to use PowerScheduler EPG scheduling. There you can specify a script to run each time the system wakes for EPG grabbing. Not very intuitive but it should work.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    ok confused. This morning several of the channels had no EPG listings. I reran the grabber and updated the xml file.
    As I understand it this update would have triggered an import (machine was on for a while afterwards)

    Anyway I checked the file and all was ok. Missing channels had programs entries and valid well formed xml.

    I clicked the import button in the config app and lo and behold the missing programs appeared...

    When the wiki says
    There is no direct usage of XMLTV. When the timestamp of the tvguide.xml file is updated the server will automatically re-import the data. To force the server to import your tvguide.xml file, hit the Import button on the Settings page.
    how does the recognition of an updated file work? How can I tell it has actually worked?

    tv.log is currently something like 20MB of mostly entries saying that I have tried to import an existing program into the EPG so it is difficult to find anything helpful (and probably not wise to update this huge file)
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    XMLTV imports a tvguide if its "modified" time is later than the end of the last import. So if you run the grabber while xmltv was still importing the previous tvguide, this is probably normal.

    Why is your tv.log full of entries saying that you have tried to import an existing program into the EPG? All programs should have been removed prior to the import.
     

    Users who are viewing this thread

    Top Bottom