use modelName for detection if eligible for motion pro

This commit is contained in:
Vincent Maas committed 2021-05-30 17:17:46 +02:00
1 parent 4614886954
commit a17534abcb
5 files changed
+29 -5

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@
<ProductName>ColorControl</ProductName>
<PublisherName>Maassoft</PublisherName>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>3.1.0.0</ApplicationVersion>
<ApplicationVersion>3.1.1.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
+11 -1
View File
@@ -34,6 +34,9 @@ namespace ColorControl
[JsonIgnore]
private Dictionary<string, Func<bool>> _invokableActions = new Dictionary<string, Func<bool>>();
[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)
+2 -1
View File
@@ -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)
{
+2 -2
View File
@@ -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")]
+13
View File
@@ -417,6 +417,19 @@ namespace LgTv
}
}
public async Task<dynamic> 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();