|
|
@ -1,11 +1,13 @@
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using AutoMapper;
|
|
|
|
using AutoMapper;
|
|
|
|
using Hangfire;
|
|
|
|
using Hangfire;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
using Microsoft.Extensions.PlatformAbstractions;
|
|
|
|
using Ombi.Api.Emby;
|
|
|
|
using Ombi.Api.Emby;
|
|
|
|
using Ombi.Attributes;
|
|
|
|
using Ombi.Attributes;
|
|
|
|
using Ombi.Core.Models.UI;
|
|
|
|
using Ombi.Core.Models.UI;
|
|
|
@ -13,6 +15,7 @@ using Ombi.Core.Settings;
|
|
|
|
using Ombi.Core.Settings.Models;
|
|
|
|
using Ombi.Core.Settings.Models;
|
|
|
|
using Ombi.Core.Settings.Models.External;
|
|
|
|
using Ombi.Core.Settings.Models.External;
|
|
|
|
using Ombi.Helpers;
|
|
|
|
using Ombi.Helpers;
|
|
|
|
|
|
|
|
using Ombi.Models;
|
|
|
|
using Ombi.Schedule.Jobs;
|
|
|
|
using Ombi.Schedule.Jobs;
|
|
|
|
using Ombi.Schedule.Jobs.Emby;
|
|
|
|
using Ombi.Schedule.Jobs.Emby;
|
|
|
|
using Ombi.Schedule.Jobs.Radarr;
|
|
|
|
using Ombi.Schedule.Jobs.Radarr;
|
|
|
@ -24,6 +27,7 @@ using Ombi.Store.Repository;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Ombi.Controllers
|
|
|
|
namespace Ombi.Controllers
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// The Settings Controller
|
|
|
|
/// The Settings Controller
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
@ -89,6 +93,25 @@ namespace Ombi.Controllers
|
|
|
|
return await Save(ombi);
|
|
|
|
return await Save(ombi);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[HttpGet("about")]
|
|
|
|
|
|
|
|
public AboutViewModel About()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var model = new AboutViewModel
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
FrameworkDescription = RuntimeInformation.FrameworkDescription,
|
|
|
|
|
|
|
|
OsArchitecture = RuntimeInformation.OSArchitecture.ToString(),
|
|
|
|
|
|
|
|
OsDescription = RuntimeInformation.OSDescription,
|
|
|
|
|
|
|
|
ProcessArchitecture = RuntimeInformation.ProcessArchitecture.ToString(),
|
|
|
|
|
|
|
|
ApplicationBasePath =PlatformServices.Default.Application.ApplicationBasePath
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var version = AssemblyHelper.GetRuntimeVersion();
|
|
|
|
|
|
|
|
var productArray = version.Split('-');
|
|
|
|
|
|
|
|
model.Version = productArray[0];
|
|
|
|
|
|
|
|
model.Branch = productArray[1];
|
|
|
|
|
|
|
|
return model;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[HttpPost("ombi/resetApi")]
|
|
|
|
[HttpPost("ombi/resetApi")]
|
|
|
|
public async Task<string> ResetApiKey()
|
|
|
|
public async Task<string> ResetApiKey()
|
|
|
|
{
|
|
|
|
{
|
|
|
|