infoviewer: fix FIXME comment in c3415790b1

Origin commit data
------------------
Branch: ni/coolstream
Commit: 91a033dfb0
Author: TangoCash <eric@loxat.de>
Date: 2017-11-07 (Tue, 07 Nov 2017)

Origin message was:
------------------
- infoviewer: fix FIXME comment in c3415790b1

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
TangoCash
2017-11-07 16:52:46 +01:00
committed by vanhofen
parent 144a791247
commit efa517c6f9

View File

@@ -984,17 +984,23 @@ bool CInfoViewer::showLivestreamInfo()
{
CZapitChannel * cc = CZapit::getInstance()->GetCurrentChannel();
bool web_mode = (CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_webtv || CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_webradio);
if (web_mode && cc->getEpgID() == 0 && !cc->getScriptName().empty()) {
if (web_mode && cc->getEpgID() == 0)
{
std::string livestreamInfo1 = "";
std::string livestreamInfo2 = "";
if (!cc->getScriptName().empty())
{
std::string tmp1 = "";
CMoviePlayerGui::getInstance().getLivestreamInfo(&livestreamInfo1, &tmp1);
if (!(videoDecoder->getBlank())) {
int xres = 0, yres = 0, framerate = 0;
if (!(videoDecoder->getBlank()))
{
int xres, yres, framerate;
std::string tmp2;
videoDecoder->getPictureInfo(xres, yres, framerate);
switch (framerate) {
switch (framerate)
{
case 0:
tmp2 = "23.976fps";
break;
@@ -1020,7 +1026,6 @@ bool CInfoViewer::showLivestreamInfo()
tmp2 = "60fps";
break;
default:
framerate = 0;
tmp2 = g_Locale->getText(LOCALE_STREAMINFO_FRAMERATE_UNKNOWN);
break;
}
@@ -1028,21 +1033,10 @@ bool CInfoViewer::showLivestreamInfo()
if (!tmp1.empty())
livestreamInfo2 += (std::string)", " + tmp1;
}
if (livestreamInfo1 != _livestreamInfo1 || livestreamInfo2 != _livestreamInfo2) {
display_Info(livestreamInfo1.c_str(), livestreamInfo2.c_str(), false);
_livestreamInfo1 = livestreamInfo1;
_livestreamInfo2 = livestreamInfo2;
infoViewerBB->showBBButtons(true /*paintFooter*/);
}
return true;
}
// FIXME: move this block in the block above
else if (web_mode && cc->getEpgID() == 0)
else
{
// try to get meta data
std::string livestreamInfo1 = "";
std::string livestreamInfo2 = "";
std::string artist = "";
std::string title = "";
std::vector<std::string> keys, values;
@@ -1050,14 +1044,18 @@ bool CInfoViewer::showLivestreamInfo()
if (playback)
playback->GetMetadata(keys, values);
size_t count = keys.size();
if (count > 0) {
for (size_t i = 0; i < count; i++) {
if (count > 0)
{
for (size_t i = 0; i < count; i++)
{
std::string key = trim(keys[i]);
if (!strcasecmp("artist", key.c_str())) {
if (!strcasecmp("artist", key.c_str()))
{
artist = isUTF8(values[i]) ? values[i] : convertLatin1UTF8(values[i]);
continue;
}
if (!strcasecmp("title", key.c_str())) {
if (!strcasecmp("title", key.c_str()))
{
title = isUTF8(values[i]) ? values[i] : convertLatin1UTF8(values[i]);
continue;
}
@@ -1073,7 +1071,10 @@ bool CInfoViewer::showLivestreamInfo()
livestreamInfo1 += " - ";
livestreamInfo1 += title;
}
if (livestreamInfo1 != _livestreamInfo1 || livestreamInfo2 != _livestreamInfo2) {
}
if (livestreamInfo1 != _livestreamInfo1 || livestreamInfo2 != _livestreamInfo2)
{
display_Info(livestreamInfo1.c_str(), livestreamInfo2.c_str(), false);
_livestreamInfo1 = livestreamInfo1;
_livestreamInfo2 = livestreamInfo2;
@@ -1081,7 +1082,6 @@ bool CInfoViewer::showLivestreamInfo()
}
return true;
}
return false;
}