|
|
@ -1058,9 +1058,16 @@ namespace MediaBrowser.Server.Implementations.Library
|
|
|
|
UpdateItemInLibraryCache(item);
|
|
|
|
UpdateItemInLibraryCache(item);
|
|
|
|
|
|
|
|
|
|
|
|
if (ItemAdded != null)
|
|
|
|
if (ItemAdded != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ItemAdded(this, new ItemChangeEventArgs { Item = item });
|
|
|
|
ItemAdded(this, new ItemChangeEventArgs { Item = item });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_logger.ErrorException("Error in ItemUpdated event handler", ex);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -1076,9 +1083,16 @@ namespace MediaBrowser.Server.Implementations.Library
|
|
|
|
UpdateItemInLibraryCache(item);
|
|
|
|
UpdateItemInLibraryCache(item);
|
|
|
|
|
|
|
|
|
|
|
|
if (ItemUpdated != null)
|
|
|
|
if (ItemUpdated != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ItemUpdated(this, new ItemChangeEventArgs { Item = item });
|
|
|
|
ItemUpdated(this, new ItemChangeEventArgs { Item = item });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_logger.ErrorException("Error in ItemUpdated event handler", ex);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -1088,9 +1102,16 @@ namespace MediaBrowser.Server.Implementations.Library
|
|
|
|
public void ReportItemRemoved(BaseItem item)
|
|
|
|
public void ReportItemRemoved(BaseItem item)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (ItemRemoved != null)
|
|
|
|
if (ItemRemoved != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ItemRemoved(this, new ItemChangeEventArgs { Item = item });
|
|
|
|
ItemRemoved(this, new ItemChangeEventArgs { Item = item });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_logger.ErrorException("Error in ItemRemoved event handler", ex);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|