Added the watchlist import for movies

This commit is contained in:
tidusjar 2022-04-07 11:20:33 +01:00
parent df59b46a78
commit f41eea89a0
55 changed files with 1824 additions and 136 deletions

View file

@ -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/)");