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
/// A .
[HttpPost]
[ProducesResponseType(StatusCodes.Status204NoContent)]
- public ActionResult AddVirtualFolder(
+ public async Task 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
/// A .
[HttpDelete]
[ProducesResponseType(StatusCodes.Status204NoContent)]
- public ActionResult RemoveVirtualFolder(
+ public async Task RemoveVirtualFolder(
[FromQuery] string name,
[FromQuery] bool refreshLibrary)
{
- _libraryManager.RemoveVirtualFolder(name, refreshLibrary);
+ await _libraryManager.RemoveVirtualFolder(name, refreshLibrary).ConfigureAwait(false);
return NoContent();
}