code analysis and cleanup (#1411)

* cleanup scanner project

* cleanup infrastructure projects

* cleanup ffmpeg project

* cleanup core project

* cleanup app project

* cleanup main project

* update dependencies

* code cleanup
This commit is contained in:
Jason Dove
2023-09-03 06:23:42 -05:00
committed by GitHub
parent 6414471ace
commit 245c4ec359
308 changed files with 1438 additions and 1032 deletions
+10 -10
View File
@@ -28,7 +28,7 @@ public class ScannerService : BackgroundService
_logger = logger;
}
protected override async Task ExecuteAsync(CancellationToken cancellationToken)
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
await Task.Yield();
@@ -36,7 +36,7 @@ public class ScannerService : BackgroundService
{
_logger.LogInformation("Scanner service started");
await foreach (IScannerBackgroundServiceRequest request in _channel.ReadAllAsync(cancellationToken))
await foreach (IScannerBackgroundServiceRequest request in _channel.ReadAllAsync(stoppingToken))
{
try
{
@@ -44,28 +44,28 @@ public class ScannerService : BackgroundService
switch (request)
{
case ISynchronizePlexLibraryById synchronizePlexLibraryById:
requestTask = SynchronizePlexLibrary(synchronizePlexLibraryById, cancellationToken);
requestTask = SynchronizePlexLibrary(synchronizePlexLibraryById, stoppingToken);
break;
case SynchronizeJellyfinAdminUserId synchronizeJellyfinAdminUserId:
requestTask = SynchronizeAdminUserId(synchronizeJellyfinAdminUserId, cancellationToken);
requestTask = SynchronizeAdminUserId(synchronizeJellyfinAdminUserId, stoppingToken);
break;
case SynchronizeJellyfinLibraries synchronizeJellyfinLibraries:
requestTask = SynchronizeLibraries(synchronizeJellyfinLibraries, cancellationToken);
requestTask = SynchronizeLibraries(synchronizeJellyfinLibraries, stoppingToken);
break;
case ISynchronizeJellyfinLibraryById synchronizeJellyfinLibraryById:
requestTask = SynchronizeJellyfinLibrary(synchronizeJellyfinLibraryById, cancellationToken);
requestTask = SynchronizeJellyfinLibrary(synchronizeJellyfinLibraryById, stoppingToken);
break;
case SynchronizeEmbyLibraries synchronizeEmbyLibraries:
requestTask = SynchronizeLibraries(synchronizeEmbyLibraries, cancellationToken);
requestTask = SynchronizeLibraries(synchronizeEmbyLibraries, stoppingToken);
break;
case ISynchronizeEmbyLibraryById synchronizeEmbyLibraryById:
requestTask = SynchronizeEmbyLibrary(synchronizeEmbyLibraryById, cancellationToken);
requestTask = SynchronizeEmbyLibrary(synchronizeEmbyLibraryById, stoppingToken);
break;
case SynchronizeEmbyCollections synchronizeEmbyCollections:
requestTask = SynchronizeEmbyCollections(synchronizeEmbyCollections, cancellationToken);
requestTask = SynchronizeEmbyCollections(synchronizeEmbyCollections, stoppingToken);
break;
case IScanLocalLibrary scanLocalLibrary:
requestTask = SynchronizeLocalLibrary(scanLocalLibrary, cancellationToken);
requestTask = SynchronizeLocalLibrary(scanLocalLibrary, stoppingToken);
break;
default:
throw new NotSupportedException($"Unsupported request type: {request.GetType().Name}");