infoviewer: fix audio description in mode_webtv

Origin commit data
------------------
Branch: ni/coolstream
Commit: 32c28038a3
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-01-26 (Tue, 26 Jan 2016)

Origin message was:
------------------
- infoviewer: fix audio description in mode_webtv

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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-01-26 00:57:08 +01:00
parent 7557f4eba9
commit 8e70d9fe7e
2 changed files with 7 additions and 9 deletions

View File

@@ -280,15 +280,10 @@ void CInfoViewerBB::getBBButtonInfo()
break; break;
} }
//label audio control button in movieplayer mode //label audio control button in movieplayer mode
if (mode == NeutrinoMessages::mode_ts) if (mode == NeutrinoMessages::mode_ts && !CMoviePlayerGui::getInstance().timeshift)
{ {
if (!CMoviePlayerGui::getInstance().timeshift) if (text == g_Locale->getText(LOCALE_MPKEY_AUDIO) && !g_settings.infobar_buttons_usertitle)
{ text = CMoviePlayerGui::getInstance(false).CurrentAudioName(); // use instance_mp
if (text == g_Locale->getText(LOCALE_MPKEY_AUDIO) && !g_settings.infobar_buttons_usertitle)
{
text = CMoviePlayerGui::getInstance(mode == NeutrinoMessages::mode_webtv).CurrentAudioName();
}
}
} }
bbButtonInfo[i].w = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(text) + w + 10; bbButtonInfo[i].w = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(text) + w + 10;
bbButtonInfo[i].cx = w + 5; bbButtonInfo[i].cx = w + 5;

View File

@@ -487,6 +487,7 @@ const char *CUserMenu::getUserMenuButtonName(int button, bool &active, bool retu
neutrino_locale_t loc = NONEXISTANT_LOCALE; neutrino_locale_t loc = NONEXISTANT_LOCALE;
const char *text = NULL; const char *text = NULL;
int mode = CNeutrinoApp::getInstance()->getMode();
std::vector<std::string> items = ::split(g_settings.usermenu[button]->items, ','); std::vector<std::string> items = ::split(g_settings.usermenu[button]->items, ',');
for (std::vector<std::string>::iterator it = items.begin(); it != items.end(); ++it) { for (std::vector<std::string>::iterator it = items.begin(); it != items.end(); ++it) {
@@ -537,7 +538,9 @@ const char *CUserMenu::getUserMenuButtonName(int button, bool &active, bool retu
continue; continue;
case SNeutrinoSettings::ITEM_AUDIO_SELECT: case SNeutrinoSettings::ITEM_AUDIO_SELECT:
if(loc == NONEXISTANT_LOCALE && !text) { if(loc == NONEXISTANT_LOCALE && !text) {
if (!g_RemoteControl->current_PIDs.APIDs.empty()) if (mode == NeutrinoMessages::mode_webtv)
text = CMoviePlayerGui::getInstance(true).CurrentAudioName().c_str(); // use instance_bg
else if (!g_RemoteControl->current_PIDs.APIDs.empty())
text = g_RemoteControl->current_PIDs.APIDs[ text = g_RemoteControl->current_PIDs.APIDs[
g_RemoteControl->current_PIDs.PIDs.selected_apid].desc; g_RemoteControl->current_PIDs.PIDs.selected_apid].desc;
} else } else