mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Added the watchlist import for movies
This commit is contained in:
parent
df59b46a78
commit
f41eea89a0
55 changed files with 1824 additions and 136 deletions
|
@ -70,6 +70,7 @@ using Ombi.Api.RottenTomatoes;
|
|||
using System.Net.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Ombi.Core.Services;
|
||||
using Ombi.Core.Helpers;
|
||||
|
||||
namespace Ombi.DependencyInjection
|
||||
{
|
||||
|
@ -124,6 +125,8 @@ namespace Ombi.DependencyInjection
|
|||
var runtimeVersion = AssemblyHelper.GetRuntimeVersion();
|
||||
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||
services.AddScoped<IPrincipal>(sp => sp.GetService<IHttpContextAccessor>().HttpContext.User);
|
||||
// HttpContext User is null for background jobs
|
||||
services.AddScoped<ICurrentUser, CurrentUser>(sp => new CurrentUser(sp.GetService<IHttpContextAccessor>()?.HttpContext?.User ?? null, sp.GetService<OmbiUserManager>()));
|
||||
services.AddHttpClient("OmbiClient", client =>
|
||||
{
|
||||
client.DefaultRequestHeaders.Add("User-Agent", $"Ombi/{runtimeVersion} (https://ombi.io/)");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue