aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoritsb <itsb@users.noreply.github.com>2026-08-16 09:09:18 -0500
committeritsb <itsb@users.noreply.github.com>2026-08-16 09:09:18 -0500
commitf0c5370e27180011249a7ee5740f2999d5e73051 (patch)
tree9cbb6ddab6f5a883b3e1135be1030b5a6d90e969
parent499e64b1c342bbab489407bb8059aa2684a12d8b (diff)
Preserve unknown idle playback position
-rw-r--r--Emby.Server.Implementations/Session/SessionManager.cs2
-rw-r--r--tests/Jellyfin.Server.Implementations.Tests/SessionManager/IdlePlaybackTests.cs4
2 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs
index cdd6cb4ce2..f4aa0ad03a 100644
--- a/Emby.Server.Implementations/Session/SessionManager.cs
+++ b/Emby.Server.Implementations/Session/SessionManager.cs
@@ -655,7 +655,7 @@ namespace Emby.Server.Implementations.Session
ItemId = session.NowPlayingItem is null ? Guid.Empty : session.NowPlayingItem.Id,
SessionId = session.Id,
MediaSourceId = session.PlayState?.MediaSourceId,
- PositionTicks = session.LastPlaybackCheckInPositionTicks ?? 0
+ PositionTicks = session.LastPlaybackCheckInPositionTicks
}).ConfigureAwait(false);
}
catch (Exception ex)
diff --git a/tests/Jellyfin.Server.Implementations.Tests/SessionManager/IdlePlaybackTests.cs b/tests/Jellyfin.Server.Implementations.Tests/SessionManager/IdlePlaybackTests.cs
index 3540c9de10..7722707cbe 100644
--- a/tests/Jellyfin.Server.Implementations.Tests/SessionManager/IdlePlaybackTests.cs
+++ b/tests/Jellyfin.Server.Implementations.Tests/SessionManager/IdlePlaybackTests.cs
@@ -21,9 +21,9 @@ namespace Jellyfin.Server.Implementations.Tests.SessionManager;
public class IdlePlaybackTests
{
[Theory]
- [InlineData(null, 0)]
+ [InlineData(null, null)]
[InlineData(123456789L, 123456789L)]
- public async Task CheckForIdlePlayback_StopsAtLastClientReportedPosition(long? clientPositionTicks, long expectedPositionTicks)
+ public async Task CheckForIdlePlayback_StopsAtLastClientReportedPosition(long? clientPositionTicks, long? expectedPositionTicks)
{
var playbackStopped = new TaskCompletionSource<long?>(TaskCreationOptions.RunContinuationsAsynchronously);
var eventManager = new Mock<IEventManager>();