diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-01-05 00:34:22 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-01-05 00:34:22 -0500 |
| commit | d957c0da048ed55814a3a1c397bcbc13799acd86 (patch) | |
| tree | 4149b23e0ef78726002d2d9c150331c4294c68d4 | |
| parent | d365e1df238acfdc974ea8f42668d2c88a3d961f (diff) | |
fixes #575 - Enforce playable media types
| -rw-r--r-- | MediaBrowser.Server.Implementations/Session/SessionManager.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index 6440a1242..985378f8e 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs +++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs @@ -616,7 +616,14 @@ namespace MediaBrowser.Server.Implementations.Session { if (items.Any(i => !session.QueueableMediaTypes.Contains(i.MediaType, StringComparer.OrdinalIgnoreCase))) { - throw new ArgumentException(string.Format("Session {0} is unable to queue the requested media type.", session.Id)); + throw new ArgumentException(string.Format("{0} is unable to queue the requested media type.", session.DeviceName ?? session.Id.ToString())); + } + } + else + { + if (items.Any(i => !session.PlayableMediaTypes.Contains(i.MediaType, StringComparer.OrdinalIgnoreCase))) + { + throw new ArgumentException(string.Format("{0} is unable to play the requested media type.", session.DeviceName ?? session.Id.ToString())); } } |
