mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
make model change events opt-in per repository
This commit is contained in:
parent
28b47b415f
commit
bd4856dad8
2 changed files with 9 additions and 7 deletions
|
@ -194,10 +194,17 @@ namespace NzbDrone.Core.Datastore
|
|||
}
|
||||
|
||||
|
||||
protected virtual void PublishModelEvent(TModel model, RepositoryAction action)
|
||||
private void PublishModelEvent(TModel model, RepositoryAction action)
|
||||
{
|
||||
_messageAggregator.PublishEvent(new ModelEvent<TModel>(model, action));
|
||||
if (PublishModelEvents)
|
||||
{
|
||||
_messageAggregator.PublishEvent(new ModelEvent<TModel>(model, action));
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool PublishModelEvents
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue