aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/LibraryStructureController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api/Controllers/LibraryStructureController.cs')
-rw-r--r--Jellyfin.Api/Controllers/LibraryStructureController.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/Jellyfin.Api/Controllers/LibraryStructureController.cs b/Jellyfin.Api/Controllers/LibraryStructureController.cs
index 2a885662b..117811429 100644
--- a/Jellyfin.Api/Controllers/LibraryStructureController.cs
+++ b/Jellyfin.Api/Controllers/LibraryStructureController.cs
@@ -342,6 +342,17 @@ public class LibraryStructureController : BaseJellyfinApiController
return NotFound();
}
+ LibraryOptions options = item.GetLibraryOptions();
+ foreach (var mediaPath in request.LibraryOptions!.PathInfos)
+ {
+ if (options.PathInfos.Any(i => i.Path == mediaPath.Path))
+ {
+ continue;
+ }
+
+ _libraryManager.CreateShortcut(item.Path, mediaPath);
+ }
+
item.UpdateLibraryOptions(request.LibraryOptions);
return NoContent();
}