Use parseJsonFromString() for parsing json data in

- CMoviePlayerGui::luaGetUrl()
 - CTimerList::RemoteBoxChanExists()
 - CTimerList::RemoteBoxTimerList()
 - CTimerList::paintItem()
 - cTmdb::GetMovieDetails()
 - cYTFeedParser::parseFeedJSON()
 - cYTFeedParser::parseFeedDetailsJSON()


Origin commit data
------------------
Branch: ni/coolstream
Commit: 25ae929523
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-09-19 (Tue, 19 Sep 2017)

Origin message was:
------------------
Use parseJsonFromString() for parsing json data in

  - CMoviePlayerGui::luaGetUrl()
  - CTimerList::RemoteBoxChanExists()
  - CTimerList::RemoteBoxTimerList()
  - CTimerList::paintItem()
  - cTmdb::GetMovieDetails()
  - cYTFeedParser::parseFeedJSON()
  - cYTFeedParser::parseFeedDetailsJSON()


------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2017-09-19 21:39:59 +02:00
parent fa80597608
commit 54b43f7745
4 changed files with 36 additions and 33 deletions

View File

@@ -59,6 +59,7 @@
#include <driver/fontrenderer.h>
#include <eitd/edvbstring.h>
#include <system/helpers.h>
#include <system/helpers-json.h>
#include <src/mymenu.h>
@@ -814,12 +815,12 @@ bool CMoviePlayerGui::luaGetUrl(const std::string &script, const std::string &fi
return false;
}
string errMsg = "";
Json::Value root;
Json::Reader reader;
bool parsedSuccess = reader.parse(result_string, root, false);
if (!parsedSuccess) {
bool ok = parseJsonFromString(result_string, &root, &errMsg);
if (!ok) {
printf("Failed to parse JSON\n");
printf("%s\n", reader.getFormattedErrorMessages().c_str());
printf("%s\n", errMsg.c_str());
if (box != NULL) {
box->hide();
delete box;