diff options
| author | Tim Hobbs <jesus.tesh@gmail.com> | 2014-04-06 11:01:26 -0700 |
|---|---|---|
| committer | Tim Hobbs <jesus.tesh@gmail.com> | 2014-04-06 11:01:26 -0700 |
| commit | 631bba1d3cbcd2e8dc9c84c23d89b910dc8e0113 (patch) | |
| tree | 3ff1455a7dbf551e5752b3c88f9adb3bc9554644 /MediaBrowser.Controller | |
| parent | 0f88830fd98173815da097c54e5d8d5281dbffd5 (diff) | |
| parent | c60103df64104459883f1244363cc9cd39187545 (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'MediaBrowser.Controller')
8 files changed, 75 insertions, 10 deletions
diff --git a/MediaBrowser.Controller/Dto/IDtoService.cs b/MediaBrowser.Controller/Dto/IDtoService.cs index 2704959e4..d07deaf23 100644 --- a/MediaBrowser.Controller/Dto/IDtoService.cs +++ b/MediaBrowser.Controller/Dto/IDtoService.cs @@ -1,9 +1,7 @@ using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Session; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Querying; -using MediaBrowser.Model.Session; using System; using System.Collections.Generic; @@ -22,13 +20,6 @@ namespace MediaBrowser.Controller.Dto UserDto GetUserDto(User user); /// <summary> - /// Gets the session info dto. - /// </summary> - /// <param name="session">The session.</param> - /// <returns>SessionInfoDto.</returns> - SessionInfoDto GetSessionInfoDto(SessionInfo session); - - /// <summary> /// Gets the dto id. /// </summary> /// <param name="item">The item.</param> diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 760d07611..3082d12ca 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -253,6 +253,7 @@ <Compile Include="Session\PlaybackInfo.cs" /> <Compile Include="Session\PlaybackProgressInfo.cs" /> <Compile Include="Session\PlaybackStopInfo.cs" /> + <Compile Include="Session\SessionEventArgs.cs" /> <Compile Include="Session\SessionInfo.cs" /> <Compile Include="Sorting\IBaseItemComparer.cs" /> <Compile Include="Sorting\IUserBaseItemComparer.cs" /> diff --git a/MediaBrowser.Controller/Session/ISessionController.cs b/MediaBrowser.Controller/Session/ISessionController.cs index cf57f6621..1d5fbf359 100644 --- a/MediaBrowser.Controller/Session/ISessionController.cs +++ b/MediaBrowser.Controller/Session/ISessionController.cs @@ -90,6 +90,14 @@ namespace MediaBrowser.Controller.Session Task SendServerShutdownNotification(CancellationToken cancellationToken); /// <summary> + /// Sends the session ended notification. + /// </summary> + /// <param name="sessionInfo">The session information.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task.</returns> + Task SendSessionEndedNotification(SessionInfoDto sessionInfo, CancellationToken cancellationToken); + + /// <summary> /// Sends the server restart notification. /// </summary> /// <param name="cancellationToken">The cancellation token.</param> diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs index 434c51336..f2edca082 100644 --- a/MediaBrowser.Controller/Session/ISessionManager.cs +++ b/MediaBrowser.Controller/Session/ISessionManager.cs @@ -29,6 +29,16 @@ namespace MediaBrowser.Controller.Session event EventHandler<PlaybackStopEventArgs> PlaybackStopped; /// <summary> + /// Occurs when [session started]. + /// </summary> + event EventHandler<SessionEventArgs> SessionStarted; + + /// <summary> + /// Occurs when [session ended]. + /// </summary> + event EventHandler<SessionEventArgs> SessionEnded; + + /// <summary> /// Gets the sessions. /// </summary> /// <value>The sessions.</value> @@ -84,6 +94,13 @@ namespace MediaBrowser.Controller.Session Task ReportSessionEnded(Guid sessionId); /// <summary> + /// Gets the session info dto. + /// </summary> + /// <param name="session">The session.</param> + /// <returns>SessionInfoDto.</returns> + SessionInfoDto GetSessionInfoDto(SessionInfo session); + + /// <summary> /// Sends the general command. /// </summary> /// <param name="controllingSessionId">The controlling session identifier.</param> diff --git a/MediaBrowser.Controller/Session/PlaybackInfo.cs b/MediaBrowser.Controller/Session/PlaybackInfo.cs index a97f9e0d0..2e59b6b72 100644 --- a/MediaBrowser.Controller/Session/PlaybackInfo.cs +++ b/MediaBrowser.Controller/Session/PlaybackInfo.cs @@ -40,5 +40,17 @@ namespace MediaBrowser.Controller.Session /// </summary> /// <value>The media version identifier.</value> public string MediaSourceId { get; set; } + + /// <summary> + /// Gets or sets the index of the audio stream. + /// </summary> + /// <value>The index of the audio stream.</value> + public int? AudioStreamIndex { get; set; } + + /// <summary> + /// Gets or sets the index of the subtitle stream. + /// </summary> + /// <value>The index of the subtitle stream.</value> + public int? SubtitleStreamIndex { get; set; } } } diff --git a/MediaBrowser.Controller/Session/PlaybackProgressInfo.cs b/MediaBrowser.Controller/Session/PlaybackProgressInfo.cs index 3d402aa6f..9f82fcdff 100644 --- a/MediaBrowser.Controller/Session/PlaybackProgressInfo.cs +++ b/MediaBrowser.Controller/Session/PlaybackProgressInfo.cs @@ -40,5 +40,23 @@ namespace MediaBrowser.Controller.Session /// </summary> /// <value>The media version identifier.</value> public string MediaSourceId { get; set; } + + /// <summary> + /// Gets or sets the volume level. + /// </summary> + /// <value>The volume level.</value> + public int? VolumeLevel { get; set; } + + /// <summary> + /// Gets or sets the index of the audio stream. + /// </summary> + /// <value>The index of the audio stream.</value> + public int? AudioStreamIndex { get; set; } + + /// <summary> + /// Gets or sets the index of the subtitle stream. + /// </summary> + /// <value>The index of the subtitle stream.</value> + public int? SubtitleStreamIndex { get; set; } } } diff --git a/MediaBrowser.Controller/Session/SessionEventArgs.cs b/MediaBrowser.Controller/Session/SessionEventArgs.cs new file mode 100644 index 000000000..96daa6ec9 --- /dev/null +++ b/MediaBrowser.Controller/Session/SessionEventArgs.cs @@ -0,0 +1,9 @@ +using System; + +namespace MediaBrowser.Controller.Session +{ + public class SessionEventArgs : EventArgs + { + public SessionInfo SessionInfo { get; set; } + } +} diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs index ef39977f0..9fcb024e8 100644 --- a/MediaBrowser.Controller/Session/SessionInfo.cs +++ b/MediaBrowser.Controller/Session/SessionInfo.cs @@ -126,7 +126,6 @@ namespace MediaBrowser.Controller.Session /// <value>The now playing media version identifier.</value> public string NowPlayingMediaSourceId { get; set; } - /// <summary> /// Gets or sets the now playing run time ticks. /// </summary> @@ -151,6 +150,16 @@ namespace MediaBrowser.Controller.Session public bool IsMuted { get; set; } /// <summary> + /// Gets or sets the volume level, on a scale of 0-100 + /// </summary> + /// <value>The volume level.</value> + public int? VolumeLevel { get; set; } + + public int? NowPlayingAudioStreamIndex { get; set; } + + public int? NowPlayingSubtitleStreamIndex { get; set; } + + /// <summary> /// Gets or sets the device id. /// </summary> /// <value>The device id.</value> |
