aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid <daullmer@gmail.com>2020-06-16 16:08:31 +0200
committerDavid <daullmer@gmail.com>2020-06-16 16:08:31 +0200
commita952d1567078dae0f5c732063e14a161cd784c0c (patch)
tree68f719a970e53a60b10208639d7dc6c53c755626
parentedc5611ec7c638164ffe14e4c06055d4fd58b5e8 (diff)
Await Task from _libraryManager
-rw-r--r--Jellyfin.Api/Controllers/LibraryStructureController.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Jellyfin.Api/Controllers/LibraryStructureController.cs b/Jellyfin.Api/Controllers/LibraryStructureController.cs
index ecbfed469..a989efe7f 100644
--- a/Jellyfin.Api/Controllers/LibraryStructureController.cs
+++ b/Jellyfin.Api/Controllers/LibraryStructureController.cs
@@ -1,3 +1,4 @@
+#nullable enable
#pragma warning disable CA1801
using System;
@@ -73,7 +74,7 @@ namespace Jellyfin.Api.Controllers
/// <returns>A <see cref="NoContentResult"/>.</returns>
[HttpPost]
[ProducesResponseType(StatusCodes.Status204NoContent)]
- public ActionResult AddVirtualFolder(
+ public async Task<ActionResult> AddVirtualFolder(
[FromQuery] string name,
[FromQuery] string collectionType,
[FromQuery] bool refreshLibrary,
@@ -87,7 +88,7 @@ namespace Jellyfin.Api.Controllers
libraryOptions.PathInfos = paths.Select(i => new MediaPathInfo { Path = i }).ToArray();
}
- _libraryManager.AddVirtualFolder(name, collectionType, libraryOptions, refreshLibrary);
+ await _libraryManager.AddVirtualFolder(name, collectionType, libraryOptions, refreshLibrary).ConfigureAwait(false);
return NoContent();
}
@@ -101,11 +102,11 @@ namespace Jellyfin.Api.Controllers
/// <returns>A <see cref="NoContentResult"/>.</returns>
[HttpDelete]
[ProducesResponseType(StatusCodes.Status204NoContent)]
- public ActionResult RemoveVirtualFolder(
+ public async Task<ActionResult> RemoveVirtualFolder(
[FromQuery] string name,
[FromQuery] bool refreshLibrary)
{
- _libraryManager.RemoveVirtualFolder(name, refreshLibrary);
+ await _libraryManager.RemoveVirtualFolder(name, refreshLibrary).ConfigureAwait(false);
return NoContent();
}