From e251f1483ff0adf299266449cc54a6c411a7d7d8 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Mon, 1 Aug 2022 14:25:44 -0400 Subject: [PATCH] Backport pull request #8167 from jellyfin/release-10.8.z Add back library scan from library manager Authored-by: Cody Robibero Merged-by: Bond-009 Original-merge: f9dffa767f71f287e384282679a9af5e20bc370e --- 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 c54945c93..2843fb8f8 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 313d27ce6..5905c25a5 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(); } }