mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Add OnLibraryChanged event to server Kernel
This commit is contained in:
parent
922fd3acae
commit
7186d66109
@ -22,7 +22,11 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
{
|
{
|
||||||
if (ChildrenChanged != null)
|
if (ChildrenChanged != null)
|
||||||
{
|
{
|
||||||
Task.Run( () => ChildrenChanged(this, args));
|
Task.Run( () =>
|
||||||
|
{
|
||||||
|
ChildrenChanged(this, args);
|
||||||
|
Kernel.Instance.OnLibraryChanged(args);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +25,21 @@ namespace MediaBrowser.Controller
|
|||||||
{
|
{
|
||||||
public class Kernel : BaseKernel<ServerConfiguration, ServerApplicationPaths>
|
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 static Kernel Instance { get; private set; }
|
||||||
|
|
||||||
public ItemController ItemController { get; private set; }
|
public ItemController ItemController { get; private set; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user