From 584c9c81e023a2be37755d709c2c37f78b655090 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 11 Sep 2021 21:24:36 +0200 Subject: [PATCH] lcd4l: fix eventinfo for webtv/radio commit based upon https://github.com/Duckbox-Developers/neutrino-ddt/commit/c1a45defc69129b6d168788b50bbf8fdfacb72b8 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5fc395712b387bd98a0291eff8dbf281ce322b7e Author: vanhofen Date: 2021-09-11 (Sat, 11 Sep 2021) Origin message was: ------------------ - lcd4l: fix eventinfo for webtv/radio commit based upon https://github.com/Duckbox-Developers/neutrino-ddt/commit/c1a45defc69129b6d168788b50bbf8fdfacb72b8 ------------------ This commit was generated by Migit --- src/driver/lcd4l.cpp | 20 ++++++++++++++------ src/gui/infoviewer.h | 1 + 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/driver/lcd4l.cpp b/src/driver/lcd4l.cpp index 34498bfe7..07a20bb8b 100644 --- a/src/driver/lcd4l.cpp +++ b/src/driver/lcd4l.cpp @@ -878,6 +878,20 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) if (m_ModeChannel) { + if (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webtv || CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webradio) + { + // FIXME: Doesn't work with timing.infobar_tv/radio=0 + if (g_InfoViewer->get_livestreamInfo1() == "RESOLUTION=1x1") // comes from best_bitrate_m3u8.lua + { + Event = g_InfoViewer->get_livestreamInfo2(); + } + else + { + Event = g_InfoViewer->get_livestreamInfo1(); + Event += "\n" + g_InfoViewer->get_livestreamInfo2(); + } + } + t_channel_id channel_id = parseID & 0xFFFFFFFFFFFFULL; CZapitChannel *channel = CZapit::getInstance()->GetCurrentChannel(); @@ -927,12 +941,6 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) tm_struct = localtime(&next_start_time); snprintf(End, sizeof(End), "%02d:%02d", tm_struct->tm_hour, tm_struct->tm_min); } - - if (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webtv || CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webradio) - { - // FIXME: Doesn't work with timing.infobar_tv/radio=0 - Event = g_InfoViewer->get_livestreamInfo1(); - } } else if (parseID == NeutrinoModes::mode_audio) { diff --git a/src/gui/infoviewer.h b/src/gui/infoviewer.h index ba83b3048..3a26aecce 100644 --- a/src/gui/infoviewer.h +++ b/src/gui/infoviewer.h @@ -214,6 +214,7 @@ class CInfoViewer : public sigc::trackable void resetSwitchMode() {setSwitchMode(IV_MODE_DEFAULT);} std::string get_livestreamInfo1() { return _livestreamInfo1; } + std::string get_livestreamInfo2() { return _livestreamInfo2; } void changePB(); void ResetPB();