aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2020-02-19 21:07:09 +0100
committerGitHub <noreply@github.com>2020-02-19 21:07:09 +0100
commit0f173e1778577f11d86da38ff2174ac1f0e7d612 (patch)
tree20812a41d73520d58efe2a69f9b2b52b022c980d /MediaBrowser.Controller
parentcefac4f886e82a642380586b3d732e729cd76dd1 (diff)
parentcef796a5ba6dd256f425fb87c13d63c724499058 (diff)
Merge branch 'master' into sessionmanager
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Net/IAuthService.cs4
-rw-r--r--MediaBrowser.Controller/Plugins/IServerEntryPoint.cs10
-rw-r--r--MediaBrowser.Controller/Session/SessionInfo.cs7
3 files changed, 13 insertions, 8 deletions
diff --git a/MediaBrowser.Controller/Net/IAuthService.cs b/MediaBrowser.Controller/Net/IAuthService.cs
index 4c9120e0c9..9132404a08 100644
--- a/MediaBrowser.Controller/Net/IAuthService.cs
+++ b/MediaBrowser.Controller/Net/IAuthService.cs
@@ -1,3 +1,5 @@
+#nullable enable
+
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Services;
using Microsoft.AspNetCore.Http;
@@ -7,6 +9,6 @@ namespace MediaBrowser.Controller.Net
public interface IAuthService
{
void Authenticate(IRequest request, IAuthenticationAttributes authAttribtues);
- User Authenticate(HttpRequest request, IAuthenticationAttributes authAttribtues);
+ User? Authenticate(HttpRequest request, IAuthenticationAttributes authAttribtues);
}
}
diff --git a/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs b/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs
index e57929989a..1e8654c4dc 100644
--- a/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs
+++ b/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs
@@ -4,16 +4,22 @@ using System.Threading.Tasks;
namespace MediaBrowser.Controller.Plugins
{
/// <summary>
- /// Interface IServerEntryPoint
+ /// Represents an entry point for a module in the application. This interface is scanned for automatically and
+ /// provides a hook to initialize the module at application start.
+ /// The entry point can additionally be flagged as a pre-startup task by implementing the
+ /// <see cref="IRunBeforeStartup"/> interface.
/// </summary>
public interface IServerEntryPoint : IDisposable
{
/// <summary>
- /// Runs this instance.
+ /// Run the initialization for this module. This method is invoked at application start.
/// </summary>
Task RunAsync();
}
+ /// <summary>
+ /// Indicates that a <see cref="IServerEntryPoint"/> should be invoked as a pre-startup task.
+ /// </summary>
public interface IRunBeforeStartup
{
diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs
index 6e8385cf85..f1f10a3a3d 100644
--- a/MediaBrowser.Controller/Session/SessionInfo.cs
+++ b/MediaBrowser.Controller/Session/SessionInfo.cs
@@ -107,6 +107,8 @@ namespace MediaBrowser.Controller.Session
public BaseItem FullNowPlayingItem { get; set; }
+ public BaseItemDto NowViewingItem { get; set; }
+
/// <summary>
/// Gets or sets the device id.
/// </summary>
@@ -239,11 +241,6 @@ namespace MediaBrowser.Controller.Session
SessionControllers = controllers.ToArray();
}
- public bool ContainsUser(string userId)
- {
- return ContainsUser(new Guid(userId));
- }
-
public bool ContainsUser(Guid userId)
{
if (UserId.Equals(userId))