aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Session
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Session')
-rw-r--r--MediaBrowser.Controller/Session/AuthenticationRequest.cs8
-rw-r--r--MediaBrowser.Controller/Session/ISessionManager.cs8
-rw-r--r--MediaBrowser.Controller/Session/SessionInfo.cs20
3 files changed, 32 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Session/AuthenticationRequest.cs b/MediaBrowser.Controller/Session/AuthenticationRequest.cs
index a28f47a9c..685ca3bdd 100644
--- a/MediaBrowser.Controller/Session/AuthenticationRequest.cs
+++ b/MediaBrowser.Controller/Session/AuthenticationRequest.cs
@@ -5,13 +5,21 @@ namespace MediaBrowser.Controller.Session
public class AuthenticationRequest
{
public string Username { get; set; }
+
public Guid UserId { get; set; }
+
public string Password { get; set; }
+
public string PasswordSha1 { get; set; }
+
public string App { get; set; }
+
public string AppVersion { get; set; }
+
public string DeviceId { get; set; }
+
public string DeviceName { get; set; }
+
public string RemoteEndPoint { get; set; }
}
}
diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs
index 1fdb588eb..e54f21050 100644
--- a/MediaBrowser.Controller/Session/ISessionManager.cs
+++ b/MediaBrowser.Controller/Session/ISessionManager.cs
@@ -13,7 +13,7 @@ using MediaBrowser.Model.SyncPlay;
namespace MediaBrowser.Controller.Session
{
/// <summary>
- /// Interface ISessionManager
+ /// Interface ISessionManager.
/// </summary>
public interface ISessionManager
{
@@ -79,14 +79,14 @@ namespace MediaBrowser.Controller.Session
void UpdateDeviceName(string sessionId, string reportedDeviceName);
/// <summary>
- /// Used to report that playback has started for an item
+ /// Used to report that playback has started for an item.
/// </summary>
/// <param name="info">The info.</param>
/// <returns>Task.</returns>
Task OnPlaybackStart(PlaybackStartInfo info);
/// <summary>
- /// Used to report playback progress for an item
+ /// Used to report playback progress for an item.
/// </summary>
/// <param name="info">The info.</param>
/// <returns>Task.</returns>
@@ -96,7 +96,7 @@ namespace MediaBrowser.Controller.Session
Task OnPlaybackProgress(PlaybackProgressInfo info, bool isAutomated);
/// <summary>
- /// Used to report that playback has ended for an item
+ /// Used to report that playback has ended for an item.
/// </summary>
/// <param name="info">The info.</param>
/// <returns>Task.</returns>
diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs
index 2ba7c9fec..4b088998c 100644
--- a/MediaBrowser.Controller/Session/SessionInfo.cs
+++ b/MediaBrowser.Controller/Session/SessionInfo.cs
@@ -61,6 +61,7 @@ namespace MediaBrowser.Controller.Session
{
return Array.Empty<string>();
}
+
return Capabilities.PlayableMediaTypes;
}
}
@@ -108,6 +109,12 @@ namespace MediaBrowser.Controller.Session
public string DeviceName { get; set; }
/// <summary>
+ /// Gets or sets the type of the device.
+ /// </summary>
+ /// <value>The type of the device.</value>
+ public string DeviceType { get; set; }
+
+ /// <summary>
/// Gets or sets the now playing item.
/// </summary>
/// <value>The now playing item.</value>
@@ -154,6 +161,7 @@ namespace MediaBrowser.Controller.Session
return true;
}
}
+
if (controllers.Length > 0)
{
return false;
@@ -213,8 +221,17 @@ namespace MediaBrowser.Controller.Session
public string PlaylistItemId { get; set; }
+ public string ServerId { get; set; }
+
public string UserPrimaryImageTag { get; set; }
+ /// <summary>
+ /// Gets or sets the supported commands.
+ /// </summary>
+ /// <value>The supported commands.</value>
+ public string[] SupportedCommands
+ => Capabilities == null ? Array.Empty<string>() : Capabilities.SupportedCommands;
+
public Tuple<ISessionController, bool> EnsureController<T>(Func<SessionInfo, ISessionController> factory)
{
var controllers = SessionControllers.ToList();
@@ -255,6 +272,7 @@ namespace MediaBrowser.Controller.Session
return true;
}
}
+
return false;
}
@@ -292,6 +310,7 @@ namespace MediaBrowser.Controller.Session
{
return;
}
+
if (progressInfo.IsPaused)
{
return;
@@ -334,6 +353,7 @@ namespace MediaBrowser.Controller.Session
_progressTimer.Dispose();
_progressTimer = null;
}
+
_lastProgressInfo = null;
}
}