mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-23 06:25:24 -07:00
chore: fixed some warnings
This commit is contained in:
parent
4a03ecc8a0
commit
c2a1401216
5 changed files with 9 additions and 5 deletions
|
@ -53,17 +53,18 @@ namespace Ombi.Helpers
|
|||
_memoryCache.Set(CacheKey, mediaServiceCache);
|
||||
}
|
||||
|
||||
public async Task Purge()
|
||||
public Task Purge()
|
||||
{
|
||||
var keys = _memoryCache.Get<List<string>>(CacheKey);
|
||||
if (keys == null)
|
||||
{
|
||||
return;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
foreach (var key in keys)
|
||||
{
|
||||
base.Remove(key);
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -321,7 +321,9 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|||
public async Task DownloadAsync(string requestUri, string filename)
|
||||
{
|
||||
Logger.LogDebug(LoggingEvents.Updater, "Starting the DownloadAsync");
|
||||
#pragma warning disable SYSLIB0014 // Type or member is obsolete
|
||||
using (var client = new WebClient())
|
||||
#pragma warning restore SYSLIB0014 // Type or member is obsolete
|
||||
{
|
||||
await client.DownloadFileTaskAsync(requestUri, filename);
|
||||
}
|
||||
|
|
|
@ -11,10 +11,9 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Dapper" Version="1.50.2" />
|
||||
<PackageReference Include="Quartz" Version="3.1.0" />
|
||||
<PackageReference Include="Serilog" Version="2.8.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.24.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.30.0" />
|
||||
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.6.13" />
|
||||
<PackageReference Include="Markdig" Version="0.14.8" />
|
||||
|
|
|
@ -68,7 +68,9 @@ namespace Ombi
|
|||
|
||||
var services = new ServiceCollection();
|
||||
services.ConfigureDatabases(null);
|
||||
#pragma warning disable ASP0000 // Do not call 'IServiceCollection.BuildServiceProvider' in 'ConfigureServices'
|
||||
using var provider = services.BuildServiceProvider();
|
||||
#pragma warning restore ASP0000 // Do not call 'IServiceCollection.BuildServiceProvider' in 'ConfigureServices'
|
||||
var settingsDb = provider.GetRequiredService<SettingsContext>();
|
||||
var ombiDb = provider.GetRequiredService<OmbiContext>();
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ namespace Ombi
|
|||
.AllowCredentials();
|
||||
}));
|
||||
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Latest);
|
||||
services.AddMvc();
|
||||
services.AddSignalR();
|
||||
services.AddSpaStaticFiles(configuration => configuration.RootPath = "ClientApp/dist");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue