From efcffde735fa65ae34bae0bcc86313b74ed0e36c Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 20 五月 2024 13:47:38 +0800 Subject: [PATCH] 优化离线数据 --- HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs | 27 +++++++++++++++++++++++++-- 1 files changed, 25 insertions(+), 2 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs index d497f9b..6232dd0 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs @@ -32,7 +32,7 @@ bodyView = this; scene = s; - sceneFunction = fc;//.localFunction.ConvertSceneFunction(); + sceneFunction = fc.localFunction.ConvertSceneFunction(); foreach (var ll in sceneFunction.status) { try @@ -248,9 +248,32 @@ if (sceneFunction.localFunction.spk == SPK.MusicStandard) { + for (var i = 0; i < sceneFunction.status.Count;) + { + var ddd = sceneFunction.status[i]; + if (string.IsNullOrEmpty(ddd.value)) + { + sceneFunction.status.Remove(ddd); + continue; + } + i++; + } + if (sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.PlaylistName) == null) { - sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.PlaylistName, value = "hdl_special" }); + if (isOnStatus) + { + var songNameStatus = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.SongName); + { + if (songNameStatus != null) + { + if (string.IsNullOrEmpty(songNameStatus.value)) + { + sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.PlaylistName, value = "hdl_special" }); + } + } + } + } } } if (!string.IsNullOrEmpty(scene.userSceneId)) -- Gitblit v1.8.0