aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs')
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs19
1 files changed, 15 insertions, 4 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs b/MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs
index b1bc5dbe5..03daa4c2a 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs
@@ -1,4 +1,5 @@
-using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Channels;
+using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Plugins;
using MediaBrowser.Controller.Session;
@@ -69,7 +70,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
/// <param name="e">The <see cref="ItemChangeEventArgs"/> instance containing the event data.</param>
void libraryManager_ItemAdded(object sender, ItemChangeEventArgs e)
{
- if (e.Item.LocationType == LocationType.Virtual)
+ if (!FilterItem(e.Item))
{
return;
}
@@ -102,7 +103,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
/// <param name="e">The <see cref="ItemChangeEventArgs"/> instance containing the event data.</param>
void libraryManager_ItemUpdated(object sender, ItemChangeEventArgs e)
{
- if (e.Item.LocationType == LocationType.Virtual)
+ if (!FilterItem(e.Item))
{
return;
}
@@ -130,7 +131,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
/// <param name="e">The <see cref="ItemChangeEventArgs"/> instance containing the event data.</param>
void libraryManager_ItemRemoved(object sender, ItemChangeEventArgs e)
{
- if (e.Item.LocationType == LocationType.Virtual)
+ if (!FilterItem(e.Item))
{
return;
}
@@ -257,6 +258,16 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
};
}
+ private bool FilterItem(BaseItem item)
+ {
+ if (item.LocationType == LocationType.Virtual)
+ {
+ return false;
+ }
+
+ return !(item is IChannelItem);
+ }
+
/// <summary>
/// Translates the physical item to user library.
/// </summary>