diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-10-22 15:03:21 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-10-22 15:03:21 -0400 |
| commit | 32cb872b06830b07d27c52ecad9695c669783730 (patch) | |
| tree | 0c776cfa04ecd8cc6d0f726b7359caeeccba1f11 /MediaBrowser.Server.Implementations/Session | |
| parent | 96fd6459b2c01c535ae5d0090861f838d45c5c47 (diff) | |
support backdrops from multiple sources
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Session/SessionManager.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index 265cab1e71..473f2c67a7 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs +++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs @@ -174,6 +174,11 @@ namespace MediaBrowser.Server.Implementations.Session /// <param name="item">The item.</param> private void RemoveNowPlayingItem(SessionInfo session, BaseItem item) { + if (item == null) + { + throw new ArgumentNullException("item"); + } + if (session.NowPlayingItem != null && session.NowPlayingItem.Id == item.Id) { session.NowPlayingItem = null; @@ -319,6 +324,16 @@ namespace MediaBrowser.Server.Implementations.Session throw new ArgumentNullException("info"); } + if (info.Item == null) + { + throw new ArgumentException("PlaybackStopInfo.Item cannot be null"); + } + + if (info.SessionId == Guid.Empty) + { + throw new ArgumentException("PlaybackStopInfo.SessionId cannot be Guid.Empty"); + } + if (info.PositionTicks.HasValue && info.PositionTicks.Value < 0) { throw new ArgumentOutOfRangeException("positionTicks"); |
