From a639d32454ed95c476c649473e3b43678b65e44f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 11 Apr 2015 13:59:55 -0400 Subject: fix chapter image extraction --- .../EntryPoints/LibraryChangedNotifier.cs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs') 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 /// The instance containing the event data. 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 /// The instance containing the event data. 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 /// The instance containing the event data. 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); + } + /// /// Translates the physical item to user library. /// -- cgit v1.2.3