infoviewer: simplify setInfobarTimeout()

Origin commit data
------------------
Branch: ni/coolstream
Commit: 89ba2b9636
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-07-19 (Mon, 19 Jul 2021)

Origin message was:
------------------
- infoviewer: simplify setInfobarTimeout()

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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2021-07-19 17:26:59 +02:00
parent 69394b1fa6
commit cf6c4a8cc1

View File

@@ -966,35 +966,22 @@ void CInfoViewer::setInfobarTimeout(int timeout_ext)
case NeutrinoModes::mode_radio:
case NeutrinoModes::mode_webradio:
timeout = g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_RADIO];
if (timeout < 0)
timeout = 0;
timeoutEnd = CRCInput::calcTimeoutEnd(timeout + timeout_ext);
break;
case NeutrinoModes::mode_ts:
if (CMoviePlayerGui::getInstance().IsAudioPlaying())
{
timeout = g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_MEDIA_AUDIO];
if (timeout < 0)
timeout = 0;
timeoutEnd = CRCInput::calcTimeoutEnd(timeout + timeout_ext);
}
else
{
timeout = g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_MEDIA_VIDEO];
if (timeout < 0)
timeout = 0;
timeoutEnd = CRCInput::calcTimeoutEnd(timeout + timeout_ext);
}
break;
case NeutrinoModes::mode_tv:
case NeutrinoModes::mode_webtv:
default:
timeout = g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR];
if (timeout < 0)
timeout = 0;
timeoutEnd = CRCInput::calcTimeoutEnd(timeout + timeout_ext);
break;
}
if (timeout < 0)
timeout = 0;
timeoutEnd = CRCInput::calcTimeoutEnd(timeout + timeout_ext);
}
bool CInfoViewer::showLivestreamInfo()