mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
infobar: add timeout -1; automatic, without timeout
Origin commit data
------------------
Branch: ni/coolstream
Commit: 604cd953dd
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-07-18 (Sun, 18 Jul 2021)
Origin message was:
------------------
- infobar: add timeout -1; automatic, without timeout
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -959,23 +959,40 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap
|
||||
void CInfoViewer::setInfobarTimeout(int timeout_ext)
|
||||
{
|
||||
int mode = CNeutrinoApp::getInstance()->getMode();
|
||||
int timeout = 0;
|
||||
//define timeouts
|
||||
switch (mode)
|
||||
{
|
||||
case NeutrinoModes::mode_radio:
|
||||
case NeutrinoModes::mode_webradio:
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_RADIO] + timeout_ext);
|
||||
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())
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_MEDIA_AUDIO] + timeout_ext);
|
||||
{
|
||||
timeout = g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_MEDIA_AUDIO];
|
||||
if (timeout < 0)
|
||||
timeout = 0;
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd(timeout + timeout_ext);
|
||||
}
|
||||
else
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_MEDIA_VIDEO] + timeout_ext);
|
||||
{
|
||||
timeout = g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_MEDIA_AUDIO];
|
||||
if (timeout < 0)
|
||||
timeout = 0;
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd(timeout + timeout_ext);
|
||||
}
|
||||
break;
|
||||
case NeutrinoModes::mode_tv:
|
||||
case NeutrinoModes::mode_webtv:
|
||||
default:
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR] + timeout_ext);
|
||||
timeout = g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR];
|
||||
if (timeout < 0)
|
||||
timeout = 0;
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd(timeout + timeout_ext);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2486,8 +2503,8 @@ bool CInfoViewer::hasTimeout()
|
||||
{
|
||||
int mode = CNeutrinoApp::getInstance()->getMode();
|
||||
bool ret = (
|
||||
((mode == NeutrinoModes::mode_tv || mode == NeutrinoModes::mode_webtv) && g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR] != 0) ||
|
||||
((mode == NeutrinoModes::mode_radio || mode == NeutrinoModes::mode_webradio) && g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_RADIO] != 0)
|
||||
((mode == NeutrinoModes::mode_tv || mode == NeutrinoModes::mode_webtv) && g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR] != 0) ||
|
||||
((mode == NeutrinoModes::mode_radio || mode == NeutrinoModes::mode_webradio) && g_settings.handling_infobar[SNeutrinoSettings::HANDLING_INFOBAR_RADIO] != 0)
|
||||
);
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user