diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
index fde1eba9d6..697e13517a 100644
--- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs
+++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
@@ -255,14 +255,13 @@ namespace MediaBrowser.Server.Implementations.Session
///
/// Used to report playback progress for an item
///
- /// The user.
/// The item.
/// The position ticks.
/// if set to true [is paused].
/// The session id.
/// Task.
- ///
- ///
+ ///
+ /// positionTicks
public async Task OnPlaybackProgress(BaseItem item, long? positionTicks, bool isPaused, Guid sessionId)
{
if (item == null)
@@ -270,6 +269,11 @@ namespace MediaBrowser.Server.Implementations.Session
throw new ArgumentNullException();
}
+ if (positionTicks.HasValue && positionTicks.Value < 0)
+ {
+ throw new ArgumentOutOfRangeException("positionTicks");
+ }
+
var session = Sessions.First(i => i.Id.Equals(sessionId));
UpdateNowPlayingItem(session, item, isPaused, positionTicks);
@@ -310,6 +314,11 @@ namespace MediaBrowser.Server.Implementations.Session
throw new ArgumentNullException();
}
+ if (positionTicks.HasValue && positionTicks.Value < 0)
+ {
+ throw new ArgumentOutOfRangeException("positionTicks");
+ }
+
var session = Sessions.First(i => i.Id.Equals(sessionId));
RemoveNowPlayingItem(session, item);