From d85ec3a0496eb5936033a51f2b07f9f67c4ca2bd Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 26 Mar 2023 22:34:09 +0200 Subject: [PATCH] glcd: fix livestreamInfo Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e4f68aa5544b50f2a022afc4da4c2b7caa816b09 Author: vanhofen Date: 2023-03-26 (Sun, 26 Mar 2023) Origin message was: ------------------ - glcd: fix livestreamInfo ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/glcd/glcd.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/driver/glcd/glcd.cpp b/src/driver/glcd/glcd.cpp index d5eb9d389..8dcc118d1 100644 --- a/src/driver/glcd/glcd.cpp +++ b/src/driver/glcd/glcd.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -1158,6 +1159,25 @@ void cGLCD::Run(void) snprintf(tmp_end, sizeof(tmp_end), "%02d:%02d", tm->tm_hour, tm->tm_min); End = stagingEnd = tmp_end; } + + if (Epg.empty() && (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webtv || CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webradio)) + { + g_InfoViewer->get_livestreamInfo(); + if (g_InfoViewer->get_livestreamInfo1() == "RESOLUTION=1x1") // comes from best_bitrate_m3u8.lua + Epg = g_InfoViewer->get_livestreamInfo2(); + else + Epg = g_InfoViewer->get_livestreamInfo1() + " " + g_InfoViewer->get_livestreamInfo2(); + EpgWidth = font_epg.Width(Epg); + doScrollEpg = EpgWidth > bitmap->Width(); + scrollEpgForward = true; + scrollEpgSkip = 0; + if (doScrollEpg) + { + scrollEpgOffset = bitmap->Width()/4; + EpgWidth += scrollEpgOffset; + } else + scrollEpgOffset = 0; + } } }