aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2019-02-03 22:23:54 -0500
committerGitHub <noreply@github.com>2019-02-03 22:23:54 -0500
commitc4f51e16a5ba093f32e8c87b8ccd49efc4a27757 (patch)
treeef797491c45d8eaafa3f8993836593bdc2e20983 /MediaBrowser.Api
parent56dcc45dc04de6be775551f14d1ad0bb235d72f9 (diff)
parent85a58fd655240fd0ddd10bdaaad4a9bb8cd7051d (diff)
Merge pull request #736 from Bond-009/startasync
Start startup tasks async
Diffstat (limited to 'MediaBrowser.Api')
-rw-r--r--MediaBrowser.Api/ApiEntryPoint.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs
index a212d3f3a..88654a42c 100644
--- a/MediaBrowser.Api/ApiEntryPoint.cs
+++ b/MediaBrowser.Api/ApiEntryPoint.cs
@@ -130,7 +130,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Runs this instance.
/// </summary>
- public void Run()
+ public Task RunAsync()
{
try
{
@@ -148,6 +148,8 @@ namespace MediaBrowser.Api
{
Logger.LogError(ex, "Error deleting encoded media cache");
}
+
+ return Task.CompletedTask;
}
public EncodingOptions GetEncodingOptions()
@@ -162,8 +164,7 @@ namespace MediaBrowser.Api
{
var path = _config.ApplicationPaths.TranscodingTempPath;
- foreach (var file in _fileSystem.GetFilePaths(path, true)
- .ToList())
+ foreach (var file in _fileSystem.GetFilePaths(path, true))
{
_fileSystem.DeleteFile(file);
}