potentially fixes an issue with cache creation, do not remove mediator on failure

This commit is contained in:
rootdarkarchon
2023-02-28 22:45:00 +01:00
parent a37281b719
commit ebe9ea47be
10 changed files with 45 additions and 59 deletions

View File

@@ -378,6 +378,7 @@ public class CachedPlayer : MediatorSubscriberBase, IDisposable
if (downloadToken.IsCancellationRequested)
{
_logger.LogTrace("Detected cancellation");
_apiController.CancelDownload(downloadId);
return;
}
@@ -415,12 +416,6 @@ public class CachedPlayer : MediatorSubscriberBase, IDisposable
_logger.LogDebug("[{applicationId}] Application finished", _applicationId);
});
_downloadCancellationTokenSource = null;
_logger.LogDebug("Download was cancelled");
_apiController.CancelDownload(downloadId);
}, downloadToken);
}