From 205783f46f85788b307c25ef44fe42de44419e31 Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Sat, 23 Jul 2022 18:59:21 -0600 Subject: [PATCH] re-add library scan from library manager --- Emby.Server.Implementations/Library/LibraryManager.cs | 6 ++++++ MediaBrowser.Controller/Library/ILibraryManager.cs | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index c54945c93b..2843fb8f83 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2453,6 +2453,12 @@ namespace Emby.Server.Implementations.Library return RootFolder; } + /// + public void QueueLibraryScan() + { + _taskManager.QueueScheduledTask(); + } + /// public int? GetSeasonNumberFromPath(string path) => SeasonPathParser.Parse(path, true, true).SeasonNumber; diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index 313d27ce62..5905c25a57 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -570,5 +570,13 @@ namespace MediaBrowser.Controller.Library Task RunMetadataSavers(BaseItem item, ItemUpdateType updateReason); BaseItem GetParentItem(Guid? parentId, Guid? userId); + + /// + /// Queue a library scan. + /// + /// + /// This exists so plugins can trigger a library scan. + /// + void QueueLibraryScan(); } }