diff --git a/ColorControl/ColorControl.csproj b/ColorControl/ColorControl.csproj
index 9ad684e..720f60f 100644
--- a/ColorControl/ColorControl.csproj
+++ b/ColorControl/ColorControl.csproj
@@ -27,7 +27,7 @@
ColorControl
Maassoft
0
- 3.1.0.0
+ 3.1.1.0
false
true
true
diff --git a/ColorControl/LgDevice.cs b/ColorControl/LgDevice.cs
index 3ba8c95..ecfcc66 100644
--- a/ColorControl/LgDevice.cs
+++ b/ColorControl/LgDevice.cs
@@ -34,6 +34,9 @@ namespace ColorControl
[JsonIgnore]
private Dictionary> _invokableActions = new Dictionary>();
+ [JsonIgnore]
+ public string ModelName { get; private set; }
+
[JsonConstructor]
public LgDevice(string name, string ipAddress, string macAddress, bool isCustom = true, bool isDummy = false)
{
@@ -60,7 +63,14 @@ namespace ColorControl
//Test();
//_lgTvApi.Test3();
- //_lgTvApi.SetSystemSettings();
+ if (_lgTvApi != null)
+ {
+ var info = await _lgTvApi.GetSystemInfo("modelName");
+ if (info != null)
+ {
+ ModelName = info.modelName;
+ }
+ }
return _lgTvApi != null;
}
catch (Exception ex)
diff --git a/ColorControl/MainForm.cs b/ColorControl/MainForm.cs
index fa9c010..43bbe00 100644
--- a/ColorControl/MainForm.cs
+++ b/ColorControl/MainForm.cs
@@ -2440,7 +2440,8 @@ Do you want to continue?"
private void mnuLgExpert_Opening(object sender, CancelEventArgs e)
{
- mnuLgOLEDMotionPro.Visible = _lgService.SelectedDevice?.Name.Contains("C9") ?? _lgService.SelectedDevice?.Name.Contains("B9") ?? false;
+ var device = _lgService.SelectedDevice;
+ mnuLgOLEDMotionPro.Visible = device?.ModelName != null ? (device.ModelName.Contains("C9") || device.ModelName.Contains("B9")) : false;
if (mnuLgExpertBacklight.DropDownItems.Count == 0)
{
diff --git a/ColorControl/Properties/AssemblyInfo.cs b/ColorControl/Properties/AssemblyInfo.cs
index 1eb9aa2..9ee6987 100644
--- a/ColorControl/Properties/AssemblyInfo.cs
+++ b/ColorControl/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.1.0.0")]
-[assembly: AssemblyFileVersion("3.1.0.0")]
+[assembly: AssemblyVersion("3.1.1.0")]
+[assembly: AssemblyFileVersion("3.1.1.0")]
diff --git a/ColorControl/lgtv/LgTvApi.cs b/ColorControl/lgtv/LgTvApi.cs
index 2ca3be9..e198fea 100644
--- a/ColorControl/lgtv/LgTvApi.cs
+++ b/ColorControl/lgtv/LgTvApi.cs
@@ -417,6 +417,19 @@ namespace LgTv
}
}
+ public async Task GetSystemInfo(params string[] keys)
+ {
+ var payload = new
+ {
+ keys = keys
+ };
+
+ var requestMessage = new RequestMessage("ssap://system/getSystemInfo", payload);
+ var command = _connection.SendCommandAsync(requestMessage);
+ var res = await command;
+ return res;
+ }
+
public void Close()
{
_connection.Close();