diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-04-11 13:59:55 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-04-11 13:59:55 -0400 |
| commit | a639d32454ed95c476c649473e3b43678b65e44f (patch) | |
| tree | 868e4c946ea65479d3f0879d9b194e0a4be81ed3 /MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs | |
| parent | 635de736a9e3e68b1514e4d35af5d6b5c7a7a57f (diff) | |
fix chapter image extraction
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs | 19 |
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> |
