1
0

Remove unnecessary check if mediaSession is focused

This commit is contained in:
glax 2024-02-22 03:54:40 +01:00
parent 5b08f9138b
commit b87cd50b0c

View File

@ -73,9 +73,6 @@ public class DisMediaRP : IDisposable
{
this._logger?.LogDebug(ObjectToString(mediaSession));
this._logger?.LogDebug(ObjectToString(mediaProperties));
if (mediaSession != this._mediaManager.GetFocusedSession())
return;
string details = $"{mediaProperties.Title}";
if (mediaProperties.Artist.Length > 0)
@ -91,9 +88,6 @@ public class DisMediaRP : IDisposable
{
this._logger?.LogDebug(ObjectToString(mediaSession));
this._logger?.LogDebug(ObjectToString(playbackInfo));
if (mediaSession != this._mediaManager.GetFocusedSession())
return;
string playbackState = playbackInfo.PlaybackStatus switch
{
@ -122,8 +116,6 @@ public class DisMediaRP : IDisposable
{
this._logger?.LogDebug(ObjectToString(mediaSession));
this._logger?.LogDebug(ObjectToString(timelineProperties));
if (mediaSession != this._mediaManager.GetFocusedSession())
return;
if (timelineProperties.LastUpdatedTime < DateTimeOffset.UnixEpoch)
return;