mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 10:51:05 +02:00
Merge branch 'master' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox
Conflicts:
src/gui/channellist.cpp
src/gui/widget/menue.cpp
src/system/settings.h
Origin commit data
------------------
Branch: ni/coolstream
Commit: 8d4677a319
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-09-21 (Thu, 21 Sep 2017)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
#include <system/settings.h>
|
||||
#include <system/fsmounter.h>
|
||||
#include <system/helpers.h>
|
||||
#include <system/helpers-json.h>
|
||||
#include <system/httptool.h>
|
||||
|
||||
#include <json/json.h>
|
||||
@@ -738,16 +739,15 @@ bool CTimerList::RemoteBoxChanExists(t_channel_id channel_id)
|
||||
r_url += string_printf_helper(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel_id);
|
||||
r_url = httpTool.downloadString(r_url, -1, httpConnectTimeout);
|
||||
|
||||
string errMsg = "";
|
||||
Json::Value root;
|
||||
Json::Reader reader;
|
||||
bool parsedSuccess = reader.parse(r_url, root, false);
|
||||
if (!parsedSuccess) {
|
||||
bool ok = parseJsonFromString(r_url, &root, &errMsg);
|
||||
if (!ok) {
|
||||
printf("Failed to parse JSON\n");
|
||||
printf("%s\n", reader.getFormattedErrorMessages().c_str());
|
||||
printf("%s\n", errMsg.c_str());
|
||||
}
|
||||
|
||||
r_url = root.get("success","false").asString();
|
||||
|
||||
if (r_url == "false")
|
||||
ShowMsg(LOCALE_REMOTEBOX_CHANNEL_NA, convertChannelId2String(channel_id),
|
||||
CMsgBox::mbrOk, CMsgBox::mbOk, NULL, 450, 30, false);
|
||||
@@ -796,13 +796,12 @@ void CTimerList::RemoteBoxTimerList(CTimerd::TimerList &rtimerlist)
|
||||
r_url = httpTool.downloadString(r_url, -1, httpConnectTimeout);
|
||||
//printf("[remotetimer] timers:%s\n",r_url.c_str());
|
||||
|
||||
string errMsg = "";
|
||||
Json::Value root;
|
||||
Json::Reader reader;
|
||||
bool parsedSuccess = reader.parse(r_url, root, false);
|
||||
if (!parsedSuccess)
|
||||
{
|
||||
bool ok = parseJsonFromString(r_url, &root, &errMsg);
|
||||
if (!ok) {
|
||||
printf("Failed to parse JSON\n");
|
||||
printf("%s\n", reader.getFormattedErrorMessages().c_str());
|
||||
printf("%s\n", errMsg.c_str());
|
||||
it->online = false;
|
||||
} else
|
||||
it->online = true;
|
||||
@@ -1293,13 +1292,12 @@ void CTimerList::paintItem(int pos)
|
||||
r_url += string_printf_helper(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, timer.channel_id);
|
||||
r_url = httpTool.downloadString(r_url, -1, httpConnectTimeout);
|
||||
|
||||
string errMsg = "";
|
||||
Json::Value root;
|
||||
Json::Reader reader;
|
||||
bool parsedSuccess = reader.parse(r_url, root, false);
|
||||
if (!parsedSuccess)
|
||||
{
|
||||
bool ok = parseJsonFromString(r_url, &root, &errMsg);
|
||||
if (!ok) {
|
||||
printf("Failed to parse JSON\n");
|
||||
printf("%s\n", reader.getFormattedErrorMessages().c_str());
|
||||
printf("%s\n", errMsg.c_str());
|
||||
}
|
||||
|
||||
Json::Value remotechannel = root["data"]["channel"][0];
|
||||
|
Reference in New Issue
Block a user