mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Fix WLED UI handling non supported segment streaming (#1610)
This commit is contained in:
parent
af1a31b842
commit
64642a4457
@ -2331,6 +2331,7 @@ function updateElementsWled(ledType, key) {
|
||||
var enumSegSelectVals = [];
|
||||
var enumSegSelectTitleVals = [];
|
||||
var enumSegSelectDefaultVal = "";
|
||||
var defaultSegmentId = "-1";
|
||||
|
||||
if (devicesProperties[ledType] && devicesProperties[ledType][key]) {
|
||||
var ledDeviceProperties = devicesProperties[ledType][key];
|
||||
@ -2338,9 +2339,8 @@ function updateElementsWled(ledType, key) {
|
||||
if (!jQuery.isEmptyObject(ledDeviceProperties)) {
|
||||
|
||||
if (ledDeviceProperties.info) {
|
||||
if (ledDeviceProperties.info.liveseg && ledDeviceProperties.info.liveseg < 0) {
|
||||
if (!ledDeviceProperties.info.hasOwnProperty("liveseg") || ledDeviceProperties.info.liveseg < 0) {
|
||||
// "Use main segment only" is disabled
|
||||
var defaultSegmentId = "-1";
|
||||
enumSegSelectVals.push(defaultSegmentId);
|
||||
enumSegSelectTitleVals.push($.i18n('edt_dev_spec_segments_disabled_title'));
|
||||
enumSegSelectDefaultVal = defaultSegmentId;
|
||||
@ -2392,13 +2392,12 @@ function updateElementsWled(ledType, key) {
|
||||
hardwareLedCount = 1;
|
||||
}
|
||||
|
||||
if (segmentConfig) {
|
||||
if (segmentConfig && segmentConfig.streamSegmentId > defaultSegmentId) {
|
||||
var configuredstreamSegmentId = window.serverConfig.device.segments.streamSegmentId.toString();
|
||||
enumSegSelectVals = [configuredstreamSegmentId];
|
||||
enumSegSelectTitleVals = ["Segment " + configuredstreamSegmentId];
|
||||
enumSegSelectDefaultVal = configuredstreamSegmentId;
|
||||
} else {
|
||||
defaultSegmentId = "-1";
|
||||
enumSegSelectVals.push(defaultSegmentId);
|
||||
enumSegSelectTitleVals.push($.i18n('edt_dev_spec_segments_disabled_title'));
|
||||
enumSegSelectDefaultVal = defaultSegmentId;
|
||||
|
@ -301,7 +301,7 @@ bool LedDeviceWled::isReadyForSegmentStreaming(semver::version& version) const
|
||||
}
|
||||
else
|
||||
{
|
||||
Error(_log, "Version provided to test for streaming readiness is not valid ");
|
||||
Error(_log, "Version provided to test for segment streaming readiness is not valid ");
|
||||
}
|
||||
return isReady;
|
||||
}
|
||||
@ -325,7 +325,7 @@ bool LedDeviceWled::isReadyForDDPStreaming(semver::version& version) const
|
||||
}
|
||||
else
|
||||
{
|
||||
Error(_log, "Version provided to test for streaming readiness is not valid ");
|
||||
Error(_log, "Version provided to test for DDP streaming readiness is not valid ");
|
||||
}
|
||||
return isReady;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user