From c60103df64104459883f1244363cc9cd39187545 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 6 Apr 2014 13:53:23 -0400 Subject: chromecast updates --- MediaBrowser.Controller/Session/ISessionController.cs | 8 ++++++++ MediaBrowser.Controller/Session/ISessionManager.cs | 17 +++++++++++++++++ MediaBrowser.Controller/Session/PlaybackInfo.cs | 12 ++++++++++++ .../Session/PlaybackProgressInfo.cs | 18 ++++++++++++++++++ MediaBrowser.Controller/Session/SessionEventArgs.cs | 9 +++++++++ MediaBrowser.Controller/Session/SessionInfo.cs | 11 ++++++++++- 6 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 MediaBrowser.Controller/Session/SessionEventArgs.cs (limited to 'MediaBrowser.Controller/Session') 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 @@ -89,6 +89,14 @@ namespace MediaBrowser.Controller.Session /// Task. Task SendServerShutdownNotification(CancellationToken cancellationToken); + /// + /// Sends the session ended notification. + /// + /// The session information. + /// The cancellation token. + /// Task. + Task SendSessionEndedNotification(SessionInfoDto sessionInfo, CancellationToken cancellationToken); + /// /// Sends the server restart notification. /// 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 @@ -28,6 +28,16 @@ namespace MediaBrowser.Controller.Session /// event EventHandler PlaybackStopped; + /// + /// Occurs when [session started]. + /// + event EventHandler SessionStarted; + + /// + /// Occurs when [session ended]. + /// + event EventHandler SessionEnded; + /// /// Gets the sessions. /// @@ -83,6 +93,13 @@ namespace MediaBrowser.Controller.Session /// Task. Task ReportSessionEnded(Guid sessionId); + /// + /// Gets the session info dto. + /// + /// The session. + /// SessionInfoDto. + SessionInfoDto GetSessionInfoDto(SessionInfo session); + /// /// Sends the general command. /// 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 /// /// The media version identifier. public string MediaSourceId { get; set; } + + /// + /// Gets or sets the index of the audio stream. + /// + /// The index of the audio stream. + public int? AudioStreamIndex { get; set; } + + /// + /// Gets or sets the index of the subtitle stream. + /// + /// The index of the subtitle stream. + 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 /// /// The media version identifier. public string MediaSourceId { get; set; } + + /// + /// Gets or sets the volume level. + /// + /// The volume level. + public int? VolumeLevel { get; set; } + + /// + /// Gets or sets the index of the audio stream. + /// + /// The index of the audio stream. + public int? AudioStreamIndex { get; set; } + + /// + /// Gets or sets the index of the subtitle stream. + /// + /// The index of the subtitle stream. + 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 /// The now playing media version identifier. public string NowPlayingMediaSourceId { get; set; } - /// /// Gets or sets the now playing run time ticks. /// @@ -150,6 +149,16 @@ namespace MediaBrowser.Controller.Session /// true if this instance is muted; otherwise, false. public bool IsMuted { get; set; } + /// + /// Gets or sets the volume level, on a scale of 0-100 + /// + /// The volume level. + public int? VolumeLevel { get; set; } + + public int? NowPlayingAudioStreamIndex { get; set; } + + public int? NowPlayingSubtitleStreamIndex { get; set; } + /// /// Gets or sets the device id. /// -- cgit v1.2.3