aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Session/SessionInfo.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2015-03-19 13:21:35 -0400
committerLuke <luke.pulverenti@gmail.com>2015-03-19 13:21:35 -0400
commit9926be0d9de688c04065c916e44ada4177b38a80 (patch)
tree15338144a143948ffbee316641757e81489a7354 /MediaBrowser.Controller/Session/SessionInfo.cs
parentb756e677d733992c2033bdd369980a37e17609e4 (diff)
parent0564d454e5ad4f59702aa9022af6bb8fd064a9ff (diff)
Merge pull request #1043 from MediaBrowser/dev
3.0.5557.0
Diffstat (limited to 'MediaBrowser.Controller/Session/SessionInfo.cs')
-rw-r--r--MediaBrowser.Controller/Session/SessionInfo.cs40
1 files changed, 29 insertions, 11 deletions
diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs
index 078d4d70f..64b20c13e 100644
--- a/MediaBrowser.Controller/Session/SessionInfo.cs
+++ b/MediaBrowser.Controller/Session/SessionInfo.cs
@@ -14,17 +14,8 @@ namespace MediaBrowser.Controller.Session
public SessionInfo()
{
QueueableMediaTypes = new List<string>();
- PlayableMediaTypes = new List<string>
- {
- MediaType.Audio,
- MediaType.Book,
- MediaType.Game,
- MediaType.Photo,
- MediaType.Video
- };
AdditionalUsers = new List<SessionUserInfo>();
- SupportedCommands = new List<string>();
PlayState = new PlayerStateInfo();
}
@@ -32,6 +23,8 @@ namespace MediaBrowser.Controller.Session
public List<SessionUserInfo> AdditionalUsers { get; set; }
+ public ClientCapabilities Capabilities { get; set; }
+
/// <summary>
/// Gets or sets the remote end point.
/// </summary>
@@ -48,7 +41,17 @@ namespace MediaBrowser.Controller.Session
/// Gets or sets the playable media types.
/// </summary>
/// <value>The playable media types.</value>
- public List<string> PlayableMediaTypes { get; set; }
+ public List<string> PlayableMediaTypes
+ {
+ get
+ {
+ if (Capabilities == null)
+ {
+ return new List<string>();
+ }
+ return Capabilities.PlayableMediaTypes;
+ }
+ }
/// <summary>
/// Gets or sets the id.
@@ -126,7 +129,17 @@ namespace MediaBrowser.Controller.Session
/// Gets or sets the supported commands.
/// </summary>
/// <value>The supported commands.</value>
- public List<string> SupportedCommands { get; set; }
+ public List<string> SupportedCommands
+ {
+ get
+ {
+ if (Capabilities == null)
+ {
+ return new List<string>();
+ }
+ return Capabilities.SupportedCommands;
+ }
+ }
public TranscodingInfo TranscodingInfo { get; set; }
@@ -151,6 +164,11 @@ namespace MediaBrowser.Controller.Session
{
get
{
+ if (Capabilities == null || !Capabilities.SupportsMediaControl)
+ {
+ return false;
+ }
+
if (SessionController != null)
{
return SessionController.SupportsMediaControl;