From 6481688d2acc23b789dab6e8ad04a96e48c46064 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 3 May 2013 00:10:11 -0400 Subject: fixes #223 - New Content Localhost Popups Repeat 'Old' 'New Content' on Media Changes --- MediaBrowser.Controller/Library/ILibraryManager.cs | 49 ++++++++++++++-------- 1 file changed, 32 insertions(+), 17 deletions(-) (limited to 'MediaBrowser.Controller/Library/ILibraryManager.cs') diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index a456ee24c4..89d17758e9 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -1,12 +1,11 @@ -using System.IO; -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; -using MediaBrowser.Controller.IO; using MediaBrowser.Controller.Resolvers; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Entities; using System; using System.Collections.Generic; +using System.IO; using System.Threading; using System.Threading.Tasks; @@ -14,18 +13,6 @@ namespace MediaBrowser.Controller.Library { public interface ILibraryManager { - /// - /// Fires whenever any validation routine adds or removes items. The added and removed items are properties of the args. - /// *** Will fire asynchronously. *** - /// - event EventHandler LibraryChanged; - - /// - /// Reports the library changed. - /// - /// The instance containing the event data. - void ReportLibraryChanged(ChildrenChangedEventArgs args); - /// /// Resolves the item. /// @@ -185,13 +172,21 @@ namespace MediaBrowser.Controller.Library UserRootFolder GetUserRootFolder(string userRootPath); /// - /// Saves the item. + /// Creates the item. /// /// The item. /// The cancellation token. /// Task. - Task SaveItem(BaseItem item, CancellationToken cancellationToken); + Task CreateItem(BaseItem item, CancellationToken cancellationToken); + /// + /// Updates the item. + /// + /// The item. + /// The cancellation token. + /// Task. + Task UpdateItem(BaseItem item, CancellationToken cancellationToken); + /// /// Retrieves the item. /// @@ -222,5 +217,25 @@ namespace MediaBrowser.Controller.Library /// The progress. /// Task. Task ValidateArtists(CancellationToken cancellationToken, IProgress progress); + + /// + /// Occurs when [item added]. + /// + event EventHandler ItemAdded; + + /// + /// Occurs when [item updated]. + /// + event EventHandler ItemUpdated; + /// + /// Occurs when [item removed]. + /// + event EventHandler ItemRemoved; + + /// + /// Reports the item removed. + /// + /// The item. + void ReportItemRemoved(BaseItem item); } } \ No newline at end of file -- cgit v1.2.3