From bf5bb70ae2bc1ab9d3ad1def3230f0a8b9cdaf85 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 17 Sep 2021 22:14:32 +0200 Subject: [PATCH] streaminfo1: try to show correct mode Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/0b019eb8422a4feb5e03531eeba1f64c6eab6379 Author: vanhofen Date: 2021-09-17 (Fri, 17 Sep 2021) Origin message was: ------------------ - streaminfo1: try to show correct mode ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/streaminfo1.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/gui/streaminfo1.cpp b/src/gui/streaminfo1.cpp index dcaab6e05..e674e7a05 100644 --- a/src/gui/streaminfo1.cpp +++ b/src/gui/streaminfo1.cpp @@ -781,9 +781,18 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) g_Font[font_info]->RenderString(xpos, ypos, box_width, buf, COL_MENUCONTENT_TEXT); - // TODO: split info WebTV/WebRadio - snprintf(buf, sizeof(buf), "%s", IS_WEBCHAN(channel->getChannelID()) ? "Web-Channel" : - CServiceManager::getInstance()->GetSatelliteName(channel->getSatellitePosition()).c_str()); + if (IS_WEBCHAN(current_channel_id)) + { + if (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webtv) + snprintf(buf, sizeof(buf), "%s", g_Locale->getText(LOCALE_WEBTV_HEAD)); + else if (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webradio) + snprintf(buf, sizeof(buf), "%s", g_Locale->getText(LOCALE_WEBRADIO_HEAD)); + else // NeutrinoMode not set yet + snprintf(buf, sizeof(buf), "%s", "WebChannel"); + } + else + snprintf(buf, sizeof(buf), "%s", CServiceManager::getInstance()->GetSatelliteName(channel->getSatellitePosition()).c_str()); + g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width2, buf, COL_MENUCONTENT_TEXT); //channel