diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-04-15 22:17:48 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-04-15 22:17:48 -0400 |
| commit | 2ce9e05d2fc818b031f2ab12bc50ffae035033ed (patch) | |
| tree | 8c7b67c7090f5e9966c11f9b7d9411dac78533f2 /MediaBrowser.Model/Session | |
| parent | ab5f8ed13679dbe1763cafc599a8f566a36a4a14 (diff) | |
add new playback checkin endpoints
Diffstat (limited to 'MediaBrowser.Model/Session')
| -rw-r--r-- | MediaBrowser.Model/Session/PlaybackReports.cs | 118 | ||||
| -rw-r--r-- | MediaBrowser.Model/Session/SessionInfoDto.cs | 91 |
2 files changed, 148 insertions, 61 deletions
diff --git a/MediaBrowser.Model/Session/PlaybackReports.cs b/MediaBrowser.Model/Session/PlaybackReports.cs index b2361b876..24594fcb1 100644 --- a/MediaBrowser.Model/Session/PlaybackReports.cs +++ b/MediaBrowser.Model/Session/PlaybackReports.cs @@ -1,29 +1,23 @@ - +using System.Collections.Generic; +using MediaBrowser.Model.Entities; + namespace MediaBrowser.Model.Session { /// <summary> /// Class PlaybackStartInfo. /// </summary> - public class PlaybackStartInfo + public class PlaybackStartInfo : PlaybackProgressInfo { - public string UserId { get; set; } - - public string ItemId { get; set; } - - public string MediaSourceId { get; set; } - - public bool IsSeekable { get; set; } - - public string[] QueueableMediaTypes { get; set; } - - public int? AudioStreamIndex { get; set; } - - public int? SubtitleStreamIndex { get; set; } - public PlaybackStartInfo() { - QueueableMediaTypes = new string[] { }; + QueueableMediaTypes = new List<string>(); } + + /// <summary> + /// Gets or sets the queueable media types. + /// </summary> + /// <value>The queueable media types.</value> + public List<string> QueueableMediaTypes { get; set; } } /// <summary> @@ -31,22 +25,70 @@ namespace MediaBrowser.Model.Session /// </summary> public class PlaybackProgressInfo { - public string UserId { get; set; } - + /// <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 item. + /// </summary> + /// <value>The item.</value> + public BaseItemInfo Item { get; set; } + + /// <summary> + /// Gets or sets the item identifier. + /// </summary> + /// <value>The item identifier.</value> public string ItemId { get; set; } - + + /// <summary> + /// Gets or sets the session id. + /// </summary> + /// <value>The session id.</value> + public string SessionId { get; set; } + + /// <summary> + /// Gets or sets the media version identifier. + /// </summary> + /// <value>The media version identifier.</value> public string MediaSourceId { get; set; } - public long? PositionTicks { 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; } + /// <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; } - public int? AudioStreamIndex { get; set; } - - public int? SubtitleStreamIndex { get; set; } + /// <summary> + /// Gets or sets the position ticks. + /// </summary> + /// <value>The position ticks.</value> + public long? PositionTicks { get; set; } + /// <summary> + /// Gets or sets the volume level. + /// </summary> + /// <value>The volume level.</value> public int? VolumeLevel { get; set; } } @@ -55,12 +97,34 @@ namespace MediaBrowser.Model.Session /// </summary> public class PlaybackStopInfo { - public string UserId { get; set; } - + /// <summary> + /// Gets or sets the item. + /// </summary> + /// <value>The item.</value> + public BaseItemInfo Item { get; set; } + + /// <summary> + /// Gets or sets the item identifier. + /// </summary> + /// <value>The item identifier.</value> public string ItemId { get; set; } - + + /// <summary> + /// Gets or sets the session id. + /// </summary> + /// <value>The session id.</value> + public string SessionId { get; set; } + + /// <summary> + /// Gets or sets the media version identifier. + /// </summary> + /// <value>The media version identifier.</value> public string MediaSourceId { get; set; } + /// <summary> + /// Gets or sets the position ticks. + /// </summary> + /// <value>The position ticks.</value> public long? PositionTicks { get; set; } } } diff --git a/MediaBrowser.Model/Session/SessionInfoDto.cs b/MediaBrowser.Model/Session/SessionInfoDto.cs index 3754b07c7..b9dcf996e 100644 --- a/MediaBrowser.Model/Session/SessionInfoDto.cs +++ b/MediaBrowser.Model/Session/SessionInfoDto.cs @@ -94,22 +94,10 @@ namespace MediaBrowser.Model.Session public string NowViewingContext { get; set; } /// <summary> - /// Gets or sets the type of the now viewing item. + /// Gets or sets the now viewing item. /// </summary> - /// <value>The type of the now viewing item.</value> - public string NowViewingItemType { get; set; } - - /// <summary> - /// Gets or sets the now viewing item identifier. - /// </summary> - /// <value>The now viewing item identifier.</value> - public string NowViewingItemId { get; set; } - - /// <summary> - /// Gets or sets the name of the now viewing item. - /// </summary> - /// <value>The name of the now viewing item.</value> - public string NowViewingItemName { get; set; } + /// <value>The now viewing item.</value> + public BaseItemInfo NowViewingItem { get; set; } /// <summary> /// Gets or sets the name of the device. @@ -118,24 +106,6 @@ namespace MediaBrowser.Model.Session public string DeviceName { 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 now playing audio stream. - /// </summary> - /// <value>The index of the now playing audio stream.</value> - public int? NowPlayingAudioStreamIndex { get; set; } - - /// <summary> - /// Gets or sets the index of the now playing subtitle stream. - /// </summary> - /// <value>The index of the now playing subtitle stream.</value> - public int? NowPlayingSubtitleStreamIndex { 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> @@ -170,7 +140,9 @@ namespace MediaBrowser.Model.Session /// </summary> /// <value><c>true</c> if [supports remote control]; otherwise, <c>false</c>.</value> public bool SupportsRemoteControl { get; set; } - + + public PlayerStateInfo PlayState { get; set; } + public event PropertyChangedEventHandler PropertyChanged; public SessionInfoDto() @@ -211,4 +183,55 @@ namespace MediaBrowser.Model.Session SupportedCommands = new List<string>(); } } + + public class PlayerStateInfo + { + /// <summary> + /// Gets or sets the now playing position ticks. + /// </summary> + /// <value>The now playing position ticks.</value> + public long? PositionTicks { get; set; } + + /// <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 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 volume level. + /// </summary> + /// <value>The volume level.</value> + public int? VolumeLevel { get; set; } + + /// <summary> + /// Gets or sets the index of the now playing audio stream. + /// </summary> + /// <value>The index of the now playing audio stream.</value> + public int? AudioStreamIndex { get; set; } + + /// <summary> + /// Gets or sets the index of the now playing subtitle stream. + /// </summary> + /// <value>The index of the now playing subtitle stream.</value> + public int? SubtitleStreamIndex { get; set; } + + /// <summary> + /// Gets or sets the now playing media version identifier. + /// </summary> + /// <value>The now playing media version identifier.</value> + public string MediaSourceId { get; set; } + } } |
