Tapanila / SharpCaster

Chromecast C# SDK for .net standard 2.0
MIT License
309 stars 49 forks source link

Pls. change log level of 'channel not found' Message #300

Closed RobertK66 closed 4 months ago

RobertK66 commented 4 months ago

Hi if this arrives you before you make 1.1.3 relaese, pls. change this log level in Line 180 of ChroneCastClient.cs to 'Information'. There is no real need to log this as error because it is silently ignored and there are no other side effects on implemented functionality!

{
    _logger?.LogInformation($"Couldn't parse the channel from: {castMessage.Namespace}  :  {payload}");
}

My JBL Speaker does often send information on this 'urn:x-cast:com.google.cast.multizone' channel, and I would like to get rid of these... πŸ˜‰

[09:55:23] [Debug]: Sharpcaster.Channels.HeartbeatChannel - Pong sent - Heartbeat Timer restarted.                     β•‘
[09:55:26] [Debug]: ConGui.ChromeCastWrapper - Vol+ [0,140]                                                            β•‘
[09:55:26] [Debug]: ConGui.ChromeCastWrapper - StatusChanged Vol: 0.14000000059604645                                  β•‘
[09:55:26] [Error]: Sharpcaster.ChromecastClient - Couldn't parse the channel from: urn:x-cast:com.google.cast.multizonβ•‘
e  :  {"device":{"capabilities":4,"deviceId":"c03b1be8-f063-645f-ebec-dc70cbf03817","name":"My JBL Speaker","volume":{"β•‘
level":0.14000000059604645,"muted":false}},"requestId":0,"type":"DEVICE_UPDATED"}                                      β•‘
[09:55:31] [Debug]: Sharpcaster.Channels.HeartbeatChannel - Pong sent - Heartbeat Timer restarted.                     β•‘
[09:55:36] [Debug]: Sharpcaster.Channels.HeartbeatChannel - Pong sent - Heartbeat Timer restarted.     
Tapanila commented 4 months ago

Nah. I rather implement that namespace instead

RobertK66 commented 4 months ago

ok, another way of handling ;-). But I don't know how many other 'unknown channels' are there out in the wild, So pls. Do the log level change to information also!

Tapanila commented 4 months ago

Sure. Will also change it and my understanding is that there shouldn't be any other default namespaces except that one that isn't implemented.

Tapanila commented 4 months ago

This should be fixed now.

Tapanila commented 4 months ago

If you see any more message types or channels that aren't supported please let me know. I aim to add all of them

RobertK66 commented 4 months ago

Ok, I will do so.... (using 1.1.3 now)