- Update the whitelisted keys for the hdhomerun widget and move the tuner directive to be part of the widget

This commit is contained in:
Jeff Randall 2024-01-26 09:01:15 -06:00
parent a7b75e95f1
commit 91bf4379c4
2 changed files with 8 additions and 2 deletions

View File

@ -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;
}

View File

@ -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),