Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	AMRPC WatchDog Desktop/Payload.cs
#	AMRPC WatchDog Desktop/Provider.cs
  • Loading branch information
N0chteil committed Sep 10, 2023
2 parents f060cd7 + 9279470 commit 9496578
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions AMRPC WatchDog Desktop/Payload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace AMRPC_WatchDog_Desktop
{
public class Payload
{
private string _playingStateValue;
private string _playerStateValue;
private double _endTimeValue = -1;

public event PropertyChangedEventHandler PropertyChanged;
Expand All @@ -23,13 +23,13 @@ public static class PlayingStatuses
public string artist { get; set; }
public string thumbnailPath { get; set; }

public string playingState
public string playerState
{
get => _playingStateValue;
get => _playerStateValue;
set
{
if (value == _playingStateValue) return;
_playingStateValue = value;
if (value == _playerStateValue) return;
_playerStateValue = value;
NotifyPropertyChanged();
}
}
Expand All @@ -56,7 +56,7 @@ public void ResetToInitialState()
artist = null;
album = null;
thumbnailPath = null;
playingState = PlayingStatuses.NotStarted;
playerState = PlayingStatuses.NotStarted;
endTime = -1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion AMRPC WatchDog Desktop/Provider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private void OnPlaybackInfoChanged(GlobalSystemMediaTransportControlsSession sen
var playbackInfo = _ampSession.GetPlaybackInfo();
var timelineProperties = _ampSession.GetTimelineProperties();

_payload.playingState = playbackInfo.PlaybackStatus.ToString().ToLower() == Payload.PlayingStatuses.Playing
_payload.playerState = playbackInfo.PlaybackStatus.ToString().ToLower() == Payload.PlayingStatuses.Playing
? Payload.PlayingStatuses.Playing : Payload.PlayingStatuses.Paused;

Double newEndTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() +
Expand Down

0 comments on commit 9496578

Please sign in to comment.