diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-30 11:05:07 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-30 11:05:07 -0400 |
| commit | 29fd559f0a87dfe4667293251397f8a758a3c826 (patch) | |
| tree | 053b1165953c94438ed6d9ae19fd68838f2144c8 /MediaBrowser.Controller/Session | |
| parent | f4f91a8316f46ea91dca6447bcff495b7c0f0b40 (diff) | |
made session a little more flexible for playing non-library items
Diffstat (limited to 'MediaBrowser.Controller/Session')
| -rw-r--r-- | MediaBrowser.Controller/Session/ISessionManager.cs | 14 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Session/PlaybackProgressInfo.cs | 38 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Session/PlaybackStopInfo.cs | 26 |
3 files changed, 68 insertions, 10 deletions
diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs index 0932ee52d..138aa1fc3 100644 --- a/MediaBrowser.Controller/Session/ISessionManager.cs +++ b/MediaBrowser.Controller/Session/ISessionManager.cs @@ -62,24 +62,18 @@ namespace MediaBrowser.Controller.Session /// <summary> /// Used to report playback progress for an item /// </summary> - /// <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> + /// <param name="info">The info.</param> /// <returns>Task.</returns> /// <exception cref="System.ArgumentNullException"></exception> - Task OnPlaybackProgress(BaseItem item, long? positionTicks, bool isPaused, bool isMuted, Guid sessionId); + Task OnPlaybackProgress(PlaybackProgressInfo info); /// <summary> /// Used to report that playback has ended for an item /// </summary> - /// <param name="item">The item.</param> - /// <param name="positionTicks">The position ticks.</param> - /// <param name="sessionId">The session id.</param> + /// <param name="info">The info.</param> /// <returns>Task.</returns> /// <exception cref="System.ArgumentNullException"></exception> - Task OnPlaybackStopped(BaseItem item, long? positionTicks, Guid sessionId); + Task OnPlaybackStopped(PlaybackStopInfo info); /// <summary> /// Sends the system command. diff --git a/MediaBrowser.Controller/Session/PlaybackProgressInfo.cs b/MediaBrowser.Controller/Session/PlaybackProgressInfo.cs new file mode 100644 index 000000000..a07543260 --- /dev/null +++ b/MediaBrowser.Controller/Session/PlaybackProgressInfo.cs @@ -0,0 +1,38 @@ +using MediaBrowser.Controller.Entities; +using System; + +namespace MediaBrowser.Controller.Session +{ + public class PlaybackProgressInfo + { + /// <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; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is paused. + /// </summary> + /// <value><c>true</c> if this instance is paused; otherwise, <c>false</c>.</value> + public bool IsPaused { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is muted. + /// </summary> + /// <value><c>true</c> if this instance is muted; otherwise, <c>false</c>.</value> + public bool IsMuted { get; set; } + + /// <summary> + /// Gets or sets the position ticks. + /// </summary> + /// <value>The position ticks.</value> + public long? PositionTicks { get; set; } + } +} diff --git a/MediaBrowser.Controller/Session/PlaybackStopInfo.cs b/MediaBrowser.Controller/Session/PlaybackStopInfo.cs new file mode 100644 index 000000000..5d1ce0131 --- /dev/null +++ b/MediaBrowser.Controller/Session/PlaybackStopInfo.cs @@ -0,0 +1,26 @@ +using MediaBrowser.Controller.Entities; +using System; + +namespace MediaBrowser.Controller.Session +{ + public class PlaybackStopInfo + { + /// <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; } + + /// <summary> + /// Gets or sets the position ticks. + /// </summary> + /// <value>The position ticks.</value> + public long? PositionTicks { get; set; } + } +} |
