aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Boniface <joshua@boniface.me>2022-08-01 14:25:44 -0400
committerJoshua Boniface <joshua@boniface.me>2022-08-01 14:25:44 -0400
commite251f1483ff0adf299266449cc54a6c411a7d7d8 (patch)
tree1e79899bab515508ba781188a13346f757b168b6
parent0356a15056adc1ab5ec89c6a5045bb1ad73aeca4 (diff)
Backport pull request #8167 from jellyfin/release-10.8.z
Add back library scan from library manager Authored-by: Cody Robibero <cody@robibe.ro> Merged-by: Bond-009 <bond.009@outlook.com> Original-merge: f9dffa767f71f287e384282679a9af5e20bc370e
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs6
-rw-r--r--MediaBrowser.Controller/Library/ILibraryManager.cs8
2 files changed, 14 insertions, 0 deletions
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
@@ -2454,6 +2454,12 @@ namespace Emby.Server.Implementations.Library
}
/// <inheritdoc />
+ public void QueueLibraryScan()
+ {
+ _taskManager.QueueScheduledTask<RefreshMediaLibraryTask>();
+ }
+
+ /// <inheritdoc />
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);
+
+ /// <summary>
+ /// Queue a library scan.
+ /// </summary>
+ /// <remarks>
+ /// This exists so plugins can trigger a library scan.
+ /// </remarks>
+ void QueueLibraryScan();
}
}