From 1c7527b029229401a9d073769d7081146db41287 Mon Sep 17 00:00:00 2001 From: BPanther Date: Sun, 28 May 2023 22:20:44 +0200 Subject: [PATCH] fix y-web streaminfo Signed-off-by: GetAway --- data/y-web/Y_StreamInfo.yhtm | 2 +- src/nhttpd/tuxboxapi/neutrinoyparser.cpp | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/data/y-web/Y_StreamInfo.yhtm b/data/y-web/Y_StreamInfo.yhtm index 17145ae07..f5d5e3523 100644 --- a/data/y-web/Y_StreamInfo.yhtm +++ b/data/y-web/Y_StreamInfo.yhtm @@ -59,7 +59,7 @@ {=L:epg.si.frequence=}:   -
{=tsfrequency=} ({=polarisation=})
+
{=tsfrequency=} {=polarisation=}
  diff --git a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp index f3701fb76..2e6f6d338 100644 --- a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp @@ -916,8 +916,16 @@ std::string CNeutrinoYParser::func_get_current_stream_info(CyhookHandler *hh, st hh->ParamList["vtxtpid"] = (serviceinfo.vtxtpid != 0)?itoh(serviceinfo.vtxtpid):"not available"; hh->ParamList["pmtpid"] = (serviceinfo.pmtpid != 0)?itoh(serviceinfo.pmtpid):"not available"; hh->ParamList["pcrpid"] = (serviceinfo.pcrpid != 0)?itoh(serviceinfo.pcrpid):"not available"; - hh->ParamList["tsfrequency"] = string_printf("%d.%d MHz", serviceinfo.tsfrequency/1000, serviceinfo.tsfrequency%1000); - hh->ParamList["polarisation"] = serviceinfo.polarisation==1?"h":"v"; + + int mode = CNeutrinoApp::getInstance()->getMode(); + if (mode == NeutrinoModes::mode_tv || mode == NeutrinoModes::mode_radio) { + hh->ParamList["tsfrequency"] = string_printf("%d.%d MHz", serviceinfo.tsfrequency / 1000, serviceinfo.tsfrequency % 1000); + hh->ParamList["polarisation"] = serviceinfo.polarisation == 1 ? "(H)" : "(V)"; + } else { + hh->ParamList["tsfrequency"] = "not available"; + hh->ParamList["polarisation"] = ""; + } + hh->ParamList["ServiceName"] = NeutrinoAPI->GetServiceName(CZapit::getInstance()->GetCurrentChannelID()); hh->ParamList["Url"] = CZapit::getInstance()->GetCurrentChannel()->getUrl().c_str(); hh->ParamList["VideoFormat"] = NeutrinoAPI->getVideoResolutionAsString();