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
This commit is contained in:
Joshua Boniface 2022-08-01 14:25:44 -04:00
parent 0356a15056
commit e251f1483f
2 changed files with 14 additions and 0 deletions

View File

@ -2453,6 +2453,12 @@ namespace Emby.Server.Implementations.Library
return RootFolder;
}
/// <inheritdoc />
public void QueueLibraryScan()
{
_taskManager.QueueScheduledTask<RefreshMediaLibraryTask>();
}
/// <inheritdoc />
public int? GetSeasonNumberFromPath(string path)
=> SeasonPathParser.Parse(path, true, true).SeasonNumber;

View File

@ -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();
}
}