From 135168b0e0640211aee5cda9285cffb184385e83 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 3 Jan 2014 21:35:41 -0500 Subject: support adding additional users to sessions --- MediaBrowser.Controller/Entities/TV/Series.cs | 3 +++ .../Library/PlaybackProgressEventArgs.cs | 13 +++++++++---- MediaBrowser.Controller/Session/ISessionManager.cs | 14 ++++++++++++++ MediaBrowser.Controller/Session/SessionInfo.cs | 15 +++++++++++++-- 4 files changed, 39 insertions(+), 6 deletions(-) (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index 135547a37d..552a517de5 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -45,6 +45,9 @@ namespace MediaBrowser.Controller.Entities.TV public List RemoteTrailers { get; set; } + /// + /// airdate, dvd or absolute + /// public string DisplayOrder { get; set; } /// diff --git a/MediaBrowser.Controller/Library/PlaybackProgressEventArgs.cs b/MediaBrowser.Controller/Library/PlaybackProgressEventArgs.cs index ec22193959..2ec3d308e3 100644 --- a/MediaBrowser.Controller/Library/PlaybackProgressEventArgs.cs +++ b/MediaBrowser.Controller/Library/PlaybackProgressEventArgs.cs @@ -1,5 +1,6 @@ -using System; -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; +using System; +using System.Collections.Generic; namespace MediaBrowser.Controller.Library { @@ -8,10 +9,14 @@ namespace MediaBrowser.Controller.Library /// public class PlaybackProgressEventArgs : EventArgs { - public User User { get; set; } + public List Users { get; set; } public long? PlaybackPositionTicks { get; set; } public BaseItem Item { get; set; } - public UserItemData UserData { get; set; } + + public PlaybackProgressEventArgs() + { + Users = new List(); + } } public class PlaybackStopEventArgs : PlaybackProgressEventArgs diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs index e0163a3e11..08797eecdc 100644 --- a/MediaBrowser.Controller/Session/ISessionManager.cs +++ b/MediaBrowser.Controller/Session/ISessionManager.cs @@ -141,5 +141,19 @@ namespace MediaBrowser.Controller.Session /// The cancellation token. /// Task. Task SendServerRestartNotification(CancellationToken cancellationToken); + + /// + /// Adds the additional user. + /// + /// The session identifier. + /// The user identifier. + void AddAdditionalUser(Guid sessionId, Guid userId); + + /// + /// Removes the additional user. + /// + /// The session identifier. + /// The user identifier. + void RemoveAdditionalUser(Guid sessionId, Guid userId); } } \ No newline at end of file diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs index 82e9328ac3..ce07f5dc47 100644 --- a/MediaBrowser.Controller/Session/SessionInfo.cs +++ b/MediaBrowser.Controller/Session/SessionInfo.cs @@ -1,4 +1,5 @@ using MediaBrowser.Controller.Entities; +using MediaBrowser.Model.Session; using System; using System.Collections.Generic; @@ -12,8 +13,12 @@ namespace MediaBrowser.Controller.Session public SessionInfo() { QueueableMediaTypes = new List(); + + AdditionalUsersPresent = new List(); } + public List AdditionalUsersPresent { get; set; } + /// /// Gets or sets the remote end point. /// @@ -31,7 +36,7 @@ namespace MediaBrowser.Controller.Session /// /// The queueable media types. public List QueueableMediaTypes { get; set; } - + /// /// Gets or sets the id. /// @@ -42,7 +47,13 @@ namespace MediaBrowser.Controller.Session /// Gets or sets the user id. /// /// The user id. - public User User { get; set; } + public Guid? UserId { get; set; } + + /// + /// Gets or sets the username. + /// + /// The username. + public string UserName { get; set; } /// /// Gets or sets the type of the client. -- cgit v1.2.3