mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 12:44:19 +01:00
Add OnLibraryChanged event to server Kernel
This commit is contained in:
@@ -25,6 +25,21 @@ namespace MediaBrowser.Controller
|
||||
{
|
||||
public class Kernel : BaseKernel<ServerConfiguration, ServerApplicationPaths>
|
||||
{
|
||||
#region Events
|
||||
/// <summary>
|
||||
/// Fires whenever any validation routine adds or removes items. The added and removed items are properties of the args.
|
||||
/// *** Will fire asynchronously. ***
|
||||
/// </summary>
|
||||
public event EventHandler<ChildrenChangedEventArgs> LibraryChanged;
|
||||
public void OnLibraryChanged(ChildrenChangedEventArgs args)
|
||||
{
|
||||
if (LibraryChanged != null)
|
||||
{
|
||||
Task.Run(() => LibraryChanged(this, args));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
public static Kernel Instance { get; private set; }
|
||||
|
||||
public ItemController ItemController { get; private set; }
|
||||
|
||||
Reference in New Issue
Block a user