using MediaBrowser.Model.Events; using MediaBrowser.Model.FileOrganization; using MediaBrowser.Model.Querying; using System; using System.Threading; using System.Threading.Tasks; namespace MediaBrowser.Controller.FileOrganization { public interface IFileOrganizationService { event EventHandler> ItemAdded; event EventHandler> ItemUpdated; event EventHandler> ItemRemoved; event EventHandler LogReset; /// /// Processes the new files. /// void BeginProcessNewFiles(); /// /// Deletes the original file. /// /// The result identifier. /// Task. Task DeleteOriginalFile(string resultId); /// /// Clears the log. /// /// Task. Task ClearLog(); /// /// Performs the organization. /// /// The result identifier. /// Task. Task PerformOrganization(string resultId); /// /// Performs the episode organization. /// /// The request. /// Task. Task PerformEpisodeOrganization(EpisodeFileOrganizationRequest request); /// /// Gets the results. /// /// The query. /// IEnumerable{FileOrganizationResult}. QueryResult GetResults(FileOrganizationResultQuery query); /// /// Gets the result. /// /// The identifier. /// FileOrganizationResult. FileOrganizationResult GetResult(string id); /// /// Gets the result by source path. /// /// The path. /// FileOrganizationResult. FileOrganizationResult GetResultBySourcePath(string path); /// /// Saves the result. /// /// The result. /// The cancellation token. /// Task. Task SaveResult(FileOrganizationResult result, CancellationToken cancellationToken); /// /// Returns a list of smart match entries /// /// The query. /// IEnumerable{SmartMatchInfo}. QueryResult GetSmartMatchInfos(FileOrganizationResultQuery query); /// /// Deletes a smart match entry. /// /// Item name. /// The match string to delete. void DeleteSmartMatchEntry(string ItemName, string matchString); /// /// Attempts to add a an item to the list of currently processed items. /// /// The result item. /// Passing true will notify the client to reload all items, otherwise only a single item will be refreshed. /// True if the item was added, False if the item is already contained in the list. bool AddToInProgressList(FileOrganizationResult result, bool fullClientRefresh); /// /// Removes an item from the list of currently processed items. /// /// The result item. /// True if the item was removed, False if the item was not contained in the list. bool RemoveFromInprogressList(FileOrganizationResult result); } }