Stopping EPG updates for empty guide items
#1
I am working on the code to stop the regular updates for channels with no data as the server updates the EPG once a day. I have tried to increase the frequency with

<updateemptytagsinterval>3600</updateemptytagsinterval>

with no success.

When there is no data what is the proper return from GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL &channel, time_t iStart, time_t iEnd) to show that the EPG data is "empty" for this setting?  Does handle need to be populated? 

Martin
Reply
#2
Just return PVR_ERROR_NO_ERROR - nothing else to do in that case.
Reply
#3
(2019-01-03, 08:01)ksooo Wrote: Just return PVR_ERROR_NO_ERROR - nothing else to do in that case.

That is what I expected but it doesn't seem to indicate why I came getting the update requests.    Log is at https://paste.kodi.tv/yunasosidi 

Martin
Code:
PVR_ERROR cPVRClientNextPVR::GetEpg(ADDON_HANDLE handle, const PVR_CHANNEL &channel, time_t iStart, time_t iEnd)
{
  EPG_TAG broadcast;
  std::string response;
  char request[512];
  LOG_API_CALL(__FUNCTION__);
  sprintf(request, "/service?method=channel.listings&channel_id=%d&start=%d&end=%d", channel.iUniqueId, (int)iStart, (int)iEnd);
  if (DoRequest(request, response) == HTTP_OK)
  {
    TiXmlDocument doc;
    if (doc.Parse(response.c_str()) != NULL)
    {
      TiXmlElement* listingsNode = doc.RootElement()->FirstChildElement("listings");
      TiXmlElement* pListingNode;
      if (listingsNode->FirstChildElement("l")==NULL)
      {
        XBMC->Log(LOG_DEBUG, "%s:%d: Returning PVR_ERROR_NO_ERROR %d", __FUNCTION__, __LINE__, channel.iUniqueId );
        return PVR_ERROR_NO_ERROR;
      }
....
Reply
#4
Following up on this thread I found the log and server SPAM is not from empty guide items, Kodi was sending EPG request for old programs because NextPVR was sending the historical date the timer was created as the start time.

Martin
Reply

Logout Mark Read Team Forum Stats Members Help
Stopping EPG updates for empty guide items0