This commit is contained in:
Josh Hawkins
2025-03-23 13:51:06 -05:00
committed by GitHub
parent e36fe79782
commit b7fcd41737
3 changed files with 44 additions and 14 deletions

View File

@@ -549,9 +549,20 @@ export default function DraggableGridLayout({
} else {
grow = "aspect-video";
}
const streamName =
currentGroupStreamingSettings?.[camera.name]?.streamName ||
Object.values(camera.live.streams)[0];
const availableStreams = camera.live.streams || {};
const firstStreamEntry = Object.values(availableStreams)[0] || "";
const streamNameFromSettings =
currentGroupStreamingSettings?.[camera.name]?.streamName || "";
const streamExists =
streamNameFromSettings &&
Object.values(availableStreams).includes(
streamNameFromSettings,
);
const streamName = streamExists
? streamNameFromSettings
: firstStreamEntry;
const autoLive =
currentGroupStreamingSettings?.[camera.name]?.streamType !==
"no-streaming";

View File

@@ -117,7 +117,9 @@ export default function StorageMetrics({
{formatUnixTimestampToDateTime(earliestDate, {
timezone: timezone,
strftime_fmt:
config.ui.time_format == "24hour" ? "%d %b %Y" : "%B %d, %Y",
config.ui.time_format === "24hour"
? "%d %b %Y, %H:%M"
: "%B %d, %Y, %I:%M %p",
})}
</div>
)}