Upgrade packages, clean up some small things.
This commit is contained in:
parent
0e1e547c71
commit
e4d522b00e
14 changed files with 1292 additions and 1221 deletions
2413
client/package-lock.json
generated
2413
client/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -12,42 +12,42 @@
|
|||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~12.0.3",
|
||||
"@angular/common": "~12.0.3",
|
||||
"@angular/compiler": "~12.0.3",
|
||||
"@angular/core": "~12.0.3",
|
||||
"@angular/forms": "~12.0.3",
|
||||
"@angular/platform-browser": "~12.0.3",
|
||||
"@angular/platform-browser-dynamic": "~12.0.3",
|
||||
"@angular/router": "~12.0.3",
|
||||
"@angular/animations": "~12.1.2",
|
||||
"@angular/common": "~12.1.2",
|
||||
"@angular/compiler": "~12.1.2",
|
||||
"@angular/core": "~12.1.2",
|
||||
"@angular/forms": "~12.1.2",
|
||||
"@angular/platform-browser": "~12.1.2",
|
||||
"@angular/platform-browser-dynamic": "~12.1.2",
|
||||
"@angular/router": "~12.1.2",
|
||||
"@fortawesome/fontawesome-free": "^5.15.3",
|
||||
"@microsoft/signalr": "^5.0.6",
|
||||
"bulma": "^0.9.2",
|
||||
"@microsoft/signalr": "^5.0.8",
|
||||
"bulma": "^0.9.3",
|
||||
"curray": "^1.0.8",
|
||||
"ngx-filesize": "^2.0.16",
|
||||
"rxjs": "~6.6.7",
|
||||
"tslib": "^2.2.0",
|
||||
"rxjs": "~7.2.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~12.0.3",
|
||||
"@angular/cli": "~12.0.3",
|
||||
"@angular/compiler-cli": "~12.0.3",
|
||||
"@angular/language-service": "~12.0.3",
|
||||
"@types/node": "^15.12.1",
|
||||
"@types/jasmine": "~3.7.7",
|
||||
"@types/jasminewd2": "~2.0.9",
|
||||
"@angular-devkit/build-angular": "~12.1.2",
|
||||
"@angular/cli": "~12.1.2",
|
||||
"@angular/compiler-cli": "~12.1.2",
|
||||
"@angular/language-service": "~12.1.2",
|
||||
"@types/node": "^16.3.3",
|
||||
"@types/jasmine": "~3.8.1",
|
||||
"@types/jasminewd2": "~2.0.10",
|
||||
"codelyzer": "^6.0.2",
|
||||
"jasmine-core": "~3.7.1",
|
||||
"jasmine-core": "~3.8.0",
|
||||
"jasmine-spec-reporter": "~7.0.0",
|
||||
"karma": "~6.3.3",
|
||||
"karma": "~6.3.4",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage-istanbul-reporter": "~3.0.3",
|
||||
"karma-jasmine": "~4.0.1",
|
||||
"karma-jasmine-html-reporter": "^1.6.0",
|
||||
"karma-jasmine-html-reporter": "^1.7.0",
|
||||
"protractor": "~7.0.0",
|
||||
"ts-node": "~10.0.0",
|
||||
"ts-node": "~10.1.0",
|
||||
"tslint": "~6.1.0",
|
||||
"typescript": "~4.2.4"
|
||||
"typescript": "~4.3.5"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace RdtClient.Data.Data
|
|||
public class SettingData : ISettingData
|
||||
{
|
||||
private static IList<Setting> _settingCache;
|
||||
private static readonly SemaphoreSlim _settingCacheLock = new SemaphoreSlim(1);
|
||||
private static readonly SemaphoreSlim _settingCacheLock = new(1);
|
||||
|
||||
private readonly DataContext _dataContext;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace RdtClient.Data.Data
|
|||
public class TorrentData : ITorrentData
|
||||
{
|
||||
private static IList<Torrent> _torrentCache;
|
||||
private static readonly SemaphoreSlim _torrentCacheLock = new SemaphoreSlim(1);
|
||||
private static readonly SemaphoreSlim _torrentCacheLock = new(1);
|
||||
|
||||
private readonly DataContext _dataContext;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.6">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.8">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="RD.NET" Version="1.0.4" />
|
||||
<PackageReference Include="Serilog" Version="2.10.0" />
|
||||
<PackageReference Include="Serilog.Exceptions" Version="6.1.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
|
||||
<PackageReference Include="Serilog.Exceptions" Version="7.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.28.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace RdtClient.Service.Services
|
|||
{
|
||||
public class RdtHub : Hub
|
||||
{
|
||||
private static readonly ConcurrentDictionary<String, String> Users = new ConcurrentDictionary<String, String>();
|
||||
private static readonly ConcurrentDictionary<String, String> Users = new();
|
||||
|
||||
public static Boolean HasConnections => Users.Any();
|
||||
|
||||
|
|
|
|||
|
|
@ -121,8 +121,10 @@ namespace RdtClient.Service.Services
|
|||
|
||||
while (!downloadClient.Finished)
|
||||
{
|
||||
#pragma warning disable CA2016 // Forward the 'CancellationToken' parameter to methods that take one
|
||||
// ReSharper disable once MethodSupportsCancellation
|
||||
await Task.Delay(1000);
|
||||
#pragma warning restore CA2016 // Forward the 'CancellationToken' parameter to methods that take one
|
||||
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ namespace RdtClient.Service.Services
|
|||
|
||||
private static DateTime _nextUpdate = DateTime.UtcNow;
|
||||
|
||||
public static readonly ConcurrentDictionary<Guid, DownloadClient> ActiveDownloadClients = new ConcurrentDictionary<Guid, DownloadClient>();
|
||||
public static readonly ConcurrentDictionary<Guid, UnpackClient> ActiveUnpackClients = new ConcurrentDictionary<Guid, UnpackClient>();
|
||||
public static readonly ConcurrentDictionary<Guid, DownloadClient> ActiveDownloadClients = new();
|
||||
public static readonly ConcurrentDictionary<Guid, UnpackClient> ActiveUnpackClients = new();
|
||||
private readonly IDownloads _downloads;
|
||||
private readonly IRemoteService _remoteService;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace RdtClient.Service.Services
|
|||
{
|
||||
private static RdNetClient _rdtNetClient;
|
||||
|
||||
private static readonly SemaphoreSlim SemaphoreSlim = new SemaphoreSlim(1, 1);
|
||||
private static readonly SemaphoreSlim SemaphoreSlim = new(1, 1);
|
||||
|
||||
private readonly IDownloads _downloads;
|
||||
private readonly ISettings _settings;
|
||||
|
|
|
|||
|
|
@ -337,6 +337,8 @@ namespace RdtClient.Web.Controllers
|
|||
}
|
||||
|
||||
await _qBittorrent.CategoryCreate(request.Category.Trim());
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
|
|
|
|||
|
|
@ -18,13 +18,11 @@ namespace RdtClient.Web.Controllers
|
|||
public class TorrentsController : Controller
|
||||
{
|
||||
private readonly ITorrents _torrents;
|
||||
private readonly IDownloads _downloads;
|
||||
private readonly ITorrentRunner _torrentRunner;
|
||||
|
||||
public TorrentsController(ITorrents torrents, IDownloads downloads, ITorrentRunner torrentRunner)
|
||||
public TorrentsController(ITorrents torrents, ITorrentRunner torrentRunner)
|
||||
{
|
||||
_torrents = torrents;
|
||||
_downloads = downloads;
|
||||
_torrentRunner = torrentRunner;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace RdtClient.Web
|
|||
{
|
||||
public class Program
|
||||
{
|
||||
public static LoggingLevelSwitch LoggingLevelSwitch;
|
||||
public static readonly LoggingLevelSwitch LoggingLevelSwitch = new(LogEventLevel.Debug);
|
||||
|
||||
public static async Task Main(String[] args)
|
||||
{
|
||||
|
|
@ -81,8 +81,6 @@ namespace RdtClient.Web
|
|||
appSettings.HostUrl = "http://0.0.0.0:6500";
|
||||
}
|
||||
|
||||
LoggingLevelSwitch = new LoggingLevelSwitch(LogEventLevel.Debug);
|
||||
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.Enrich.FromLogContext()
|
||||
.Enrich.WithExceptionDetails()
|
||||
|
|
|
|||
|
|
@ -26,21 +26,21 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.6">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.8">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="5.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="5.0.8" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="NReco.Logging.File" Version="1.1.1" />
|
||||
<PackageReference Include="Serilog" Version="2.10.0" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="4.1.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
Loading…
Reference in a new issue