Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Only return an error when parsing of all events failed for a channel; return no error otherwise. #140

Merged
merged 2 commits into from

2 participants

Dimitris Kazakos Lars Op den Kamp
Dimitris Kazakos

fixes (harmless) errors introduced by 425a394

Lars Op den Kamp
Owner

this doesn't look right either, since it'll return an unknown error for channels without epg data.

Dimitris Kazakos

No it won't; no epg data means goodEvents == failedEvents == 0, therefore (goodEvents == 0 && failedEvents > 0) returns false, so the initial PVR_NO_ERROR is returned.
Tested it, works fine

Lars Op den Kamp
Owner

right ok, overlooked that one. could you change the error to PVR_ERROR_SERVER_ERROR instead of unknown, then i'll pull it in.

for future PR's (after frodo): create them for the pvr.hts branch instead, then we don't need to bump with each change.

Dimitris Kazakos

Done, please check

Dimitris Kazakos

Please merge this one, I have another one coming :-)

Lars Op den Kamp
Owner

i've got other things to do than merging PRs, especially in the week ends, and spamming everybody who watches this repos with "please merge" certainly won't speed things up.

Lars Op den Kamp opdenkamp merged commit 5631dc3 into from
Dimitris Kazakos

No need to be offensive, I've got other things to do, too; I am just trying to help here.

Lars Op den Kamp
Owner

Helping out is fine, but there's no need to to remind me to merge something within 24 hours after your last update to the PR. Everybody who watches this repos or my github profile will get an email when you do, and there's no need to do that. I'll review every PR and won't delay merging any PR just for fun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 5, 2013
  1. Dimitris Kazakos

    [tvheadnend] only return an error when parsing of all events failed f…

    nemphys authored
    …or a channel; return no error otherwise.
  2. Dimitris Kazakos

    [tvheadend] bump to 1.6.14

    nemphys authored
This page is out of date. Refresh to see the latest.
2  addons/pvr.hts/addon/addon.xml.in
View
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.hts"
- version="1.6.13"
+ version="1.6.14"
name="Tvheadend HTSP Client"
provider-name="Lars Op den Kamp, Team XBMC">
<requires>
4 addons/pvr.hts/addon/changelog.txt
View
@@ -1,3 +1,7 @@
+1.6.14
+
+- fix errors sent by client when fetching events for a channel with no epg data
+
1.6.13
- make channel.radio to not reset to false during update if tvheadend not provided channel services
14 addons/pvr.hts/src/HTSPData.cpp
View
@@ -799,20 +799,26 @@ PVR_ERROR CHTSPData::GetEvents(ADDON_HANDLE handle, uint32_t cid, time_t stop)
return PVR_ERROR_UNKNOWN;
}
- retVal = PVR_ERROR_UNKNOWN;
htsmsg_t *e;
htsmsg_field_t *f;
+
+ unsigned int failedEvents = 0;
+ unsigned int goodEvents = 0;
+
HTSMSG_FOREACH(f, msg)
{
if ((e = htsmsg_get_map_by_field(f)))
{
if (ParseEvent(handle, e, NULL, stop))
- {
- retVal = PVR_ERROR_NO_ERROR;
- }
+ goodEvents++;
+ else
+ failedEvents++;
}
}
+ if (goodEvents == 0 && failedEvents > 0)
+ retVal = PVR_ERROR_SERVER_ERROR;
+
return retVal;
}
Something went wrong with that request. Please try again.