From 91bf4379c47d54f19ea3672f75c5cd97f91b36e0 Mon Sep 17 00:00:00 2001 From: Jeff Randall Date: Fri, 26 Jan 2024 09:01:15 -0600 Subject: [PATCH] - Update the whitelisted keys for the hdhomerun widget and move the tuner directive to be part of the widget --- src/utils/config/service-helpers.js | 6 ++++++ src/widgets/hdhomerun/component.jsx | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index 84be1666..8d56e2a5 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -398,6 +398,9 @@ export function cleanServiceGroups(groups) { // glances, customapi, iframe refreshInterval, + // hdhomerun + tuner, + // healthchecks uuid, @@ -541,6 +544,9 @@ export function cleanServiceGroups(groups) { if (showTime) cleanedService.widget.showTime = showTime; if (timezone) cleanedService.widget.timezone = timezone; } + if (type === "hdhomerun") { + if (tuner !== undefined) cleanedService.widget.tuner = tuner; + } if (type === "healthchecks") { if (uuid !== undefined) cleanedService.widget.uuid = uuid; } diff --git a/src/widgets/hdhomerun/component.jsx b/src/widgets/hdhomerun/component.jsx index a6a8ed82..614578a5 100644 --- a/src/widgets/hdhomerun/component.jsx +++ b/src/widgets/hdhomerun/component.jsx @@ -48,8 +48,8 @@ function generateDefinitions(channelsData, statusData, tuner) { } export default function Component({ service }) { - const { widget, tuner = 0 } = service; - const { refreshInterval = 10000, fields = ["channels", "hd"] } = widget; + const { widget } = service; + const { tuner = 0, refreshInterval = 10000, fields = ["channels", "hd"] } = widget; const { data: channelsData, error: channelsError } = useWidgetAPI(widget, "lineup", { refreshInterval: Math.max(1000, refreshInterval),