mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
- timerlist: speed up loop when remote box is offline
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -790,15 +790,15 @@ bool CTimerList::RemoteBoxChanExists(t_channel_id channel_id)
|
|||||||
std::string errMsg = "";
|
std::string errMsg = "";
|
||||||
Json::Value root;
|
Json::Value root;
|
||||||
bool ok = parseJsonFromString(r_url, &root, &errMsg);
|
bool ok = parseJsonFromString(r_url, &root, &errMsg);
|
||||||
if (!ok) {
|
if (!ok)
|
||||||
|
{
|
||||||
printf("Failed to parse JSON\n");
|
printf("Failed to parse JSON\n");
|
||||||
printf("%s\n", errMsg.c_str());
|
printf("%s\n", errMsg.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
r_url = root.get("success","false").asString();
|
r_url = root.get("success","false").asString();
|
||||||
if (r_url == "false")
|
if (r_url == "false")
|
||||||
ShowMsg(LOCALE_REMOTEBOX_CHANNEL_NA, convertChannelId2String(channel_id),
|
ShowMsg(LOCALE_REMOTEBOX_CHANNEL_NA, convertChannelId2String(channel_id), CMsgBox::mbrOk, CMsgBox::mbOk, NULL, 450, 30, false);
|
||||||
CMsgBox::mbrOk, CMsgBox::mbOk, NULL, 450, 30, false);
|
|
||||||
|
|
||||||
return (r_url == "true");
|
return (r_url == "true");
|
||||||
}
|
}
|
||||||
@@ -850,11 +850,14 @@ void CTimerList::RemoteBoxTimerList(CTimerd::TimerList &rtimerlist)
|
|||||||
std::string errMsg = "";
|
std::string errMsg = "";
|
||||||
Json::Value root;
|
Json::Value root;
|
||||||
bool ok = parseJsonFromString(r_url, &root, &errMsg);
|
bool ok = parseJsonFromString(r_url, &root, &errMsg);
|
||||||
if (!ok) {
|
if (!ok)
|
||||||
|
{
|
||||||
printf("Failed to parse JSON\n");
|
printf("Failed to parse JSON\n");
|
||||||
printf("%s\n", errMsg.c_str());
|
printf("%s\n", errMsg.c_str());
|
||||||
it->online = false;
|
it->online = false;
|
||||||
} else
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
it->online = true;
|
it->online = true;
|
||||||
|
|
||||||
Json::Value delays = root["data"]["timer"][0];
|
Json::Value delays = root["data"]["timer"][0];
|
||||||
|
Reference in New Issue
Block a user