aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Session
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-09-24 11:08:51 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-09-24 11:08:51 -0400
commitb49764dbaafbbf11b6308ec675355696b9e58379 (patch)
tree58677308bf98c95f1982a84eb403a01241f0a692 /MediaBrowser.Controller/Session
parent14c464c28a3b9cac207ef741711e31cef1c15378 (diff)
fixes #555 - Have clients report seek and queuing capabilities
Diffstat (limited to 'MediaBrowser.Controller/Session')
-rw-r--r--MediaBrowser.Controller/Session/ISessionManager.cs7
-rw-r--r--MediaBrowser.Controller/Session/PlaybackInfo.cs38
-rw-r--r--MediaBrowser.Controller/Session/SessionInfo.cs13
3 files changed, 54 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs
index 1976c653a..fba1d26e8 100644
--- a/MediaBrowser.Controller/Session/ISessionManager.cs
+++ b/MediaBrowser.Controller/Session/ISessionManager.cs
@@ -47,11 +47,9 @@ namespace MediaBrowser.Controller.Session
/// <summary>
/// Used to report that playback has started for an item
/// </summary>
- /// <param name="item">The item.</param>
- /// <param name="sessionId">The session id.</param>
+ /// <param name="info">The info.</param>
/// <returns>Task.</returns>
- /// <exception cref="System.ArgumentNullException"></exception>
- Task OnPlaybackStart(BaseItem item, Guid sessionId);
+ Task OnPlaybackStart(PlaybackInfo info);
/// <summary>
/// Used to report playback progress for an item
@@ -59,6 +57,7 @@ namespace MediaBrowser.Controller.Session
/// <param name="item">The item.</param>
/// <param name="positionTicks">The position ticks.</param>
/// <param name="isPaused">if set to <c>true</c> [is paused].</param>
+ /// <param name="isMuted">if set to <c>true</c> [is muted].</param>
/// <param name="sessionId">The session id.</param>
/// <returns>Task.</returns>
/// <exception cref="System.ArgumentNullException"></exception>
diff --git a/MediaBrowser.Controller/Session/PlaybackInfo.cs b/MediaBrowser.Controller/Session/PlaybackInfo.cs
new file mode 100644
index 000000000..ab3111e76
--- /dev/null
+++ b/MediaBrowser.Controller/Session/PlaybackInfo.cs
@@ -0,0 +1,38 @@
+using MediaBrowser.Controller.Entities;
+using System;
+using System.Collections.Generic;
+
+namespace MediaBrowser.Controller.Session
+{
+ public class PlaybackInfo
+ {
+ public PlaybackInfo()
+ {
+ QueueableMediaTypes = new List<string>();
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether this instance can seek.
+ /// </summary>
+ /// <value><c>true</c> if this instance can seek; otherwise, <c>false</c>.</value>
+ public bool CanSeek { get; set; }
+
+ /// <summary>
+ /// Gets or sets the queueable media types.
+ /// </summary>
+ /// <value>The queueable media types.</value>
+ public List<string> QueueableMediaTypes { get; set; }
+
+ /// <summary>
+ /// Gets or sets the item.
+ /// </summary>
+ /// <value>The item.</value>
+ public BaseItem Item { get; set; }
+
+ /// <summary>
+ /// Gets or sets the session id.
+ /// </summary>
+ /// <value>The session id.</value>
+ public Guid SessionId { get; set; }
+ }
+}
diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs
index 6c0f1a085..ba6d3d0ac 100644
--- a/MediaBrowser.Controller/Session/SessionInfo.cs
+++ b/MediaBrowser.Controller/Session/SessionInfo.cs
@@ -15,9 +15,22 @@ namespace MediaBrowser.Controller.Session
public SessionInfo()
{
WebSockets = new List<IWebSocketConnection>();
+ QueueableMediaTypes = new List<string>();
}
/// <summary>
+ /// Gets or sets a value indicating whether this instance can seek.
+ /// </summary>
+ /// <value><c>true</c> if this instance can seek; otherwise, <c>false</c>.</value>
+ public bool CanSeek { get; set; }
+
+ /// <summary>
+ /// Gets or sets the queueable media types.
+ /// </summary>
+ /// <value>The queueable media types.</value>
+ public List<string> QueueableMediaTypes { get; set; }
+
+ /// <summary>
/// Gets or sets the id.
/// </summary>
/// <value>The id.</value>