The Free Software Media System - Server Backend & API
Await Task from _libraryManager
Davida952d1567078
diff --git a/Jellyfin.Api/Controllers/LibraryStructureController.cs b/Jellyfin.Api/Controllers/LibraryStructureController.csindex ecbfed4693..a989efe7f1 100644--- a/Jellyfin.Api/Controllers/LibraryStructureController.cs+++ b/Jellyfin.Api/Controllers/LibraryStructureController.cs@@ -1,3 +1,4 @@+#nullable enable#pragma warning disable CA1801using 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.ControllerslibraryOptions.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();}