aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Session
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Session')
-rw-r--r--MediaBrowser.Controller/Session/SessionInfo.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs
index fb68bfb770..d9bc79dec5 100644
--- a/MediaBrowser.Controller/Session/SessionInfo.cs
+++ b/MediaBrowser.Controller/Session/SessionInfo.cs
@@ -28,6 +28,7 @@ namespace MediaBrowser.Controller.Session
private readonly Lock _progressLock = new();
private Timer _progressTimer;
private PlaybackProgressInfo _lastProgressInfo;
+ private long? _lastPlaybackCheckInPositionTicks;
private bool _disposed;
@@ -125,6 +126,22 @@ namespace MediaBrowser.Controller.Session
public DateTime LastPlaybackCheckIn { get; set; }
/// <summary>
+ /// Gets the position reported by the client at the last playback check-in.
+ /// </summary>
+ /// <value>The position ticks, or <see langword="null"/> if the client did not report a position.</value>
+ [JsonIgnore]
+ public long? LastPlaybackCheckInPositionTicks
+ {
+ get
+ {
+ lock (_progressLock)
+ {
+ return _lastPlaybackCheckInPositionTicks;
+ }
+ }
+ }
+
+ /// <summary>
/// Gets or sets the last paused date.
/// </summary>
/// <value>The last paused date.</value>
@@ -372,6 +389,7 @@ namespace MediaBrowser.Controller.Session
lock (_progressLock)
{
+ _lastPlaybackCheckInPositionTicks = progressInfo.PositionTicks;
_lastProgressInfo = progressInfo;
if (_progressTimer is null)