aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-08-21 15:39:41 -0400
committerGitHub <noreply@github.com>2016-08-21 15:39:41 -0400
commit3f6b5feffba3aacbbf0387edffad0428f93ad675 (patch)
treef3eaac4c45a827b111ed4813a8c22ad0e57f6885 /MediaBrowser.Controller
parent30ba965ed2096139d9064b031e338bf81835aba8 (diff)
parent9f7dbec0db461fe416d825b483d475f476c9d42d (diff)
Merge pull request #2087 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/FileOrganization/IFileOrganizationService.cs24
-rw-r--r--MediaBrowser.Controller/Session/ISessionManager.cs12
2 files changed, 32 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/FileOrganization/IFileOrganizationService.cs b/MediaBrowser.Controller/FileOrganization/IFileOrganizationService.cs
index daa670d83..9a5b96a24 100644
--- a/MediaBrowser.Controller/FileOrganization/IFileOrganizationService.cs
+++ b/MediaBrowser.Controller/FileOrganization/IFileOrganizationService.cs
@@ -1,5 +1,7 @@
-using MediaBrowser.Model.FileOrganization;
+using MediaBrowser.Model.Events;
+using MediaBrowser.Model.FileOrganization;
using MediaBrowser.Model.Querying;
+using System;
using System.Threading;
using System.Threading.Tasks;
@@ -7,6 +9,11 @@ namespace MediaBrowser.Controller.FileOrganization
{
public interface IFileOrganizationService
{
+ event EventHandler<GenericEventArgs<FileOrganizationResult>> ItemAdded;
+ event EventHandler<GenericEventArgs<FileOrganizationResult>> ItemUpdated;
+ event EventHandler<GenericEventArgs<FileOrganizationResult>> ItemRemoved;
+ event EventHandler LogReset;
+
/// <summary>
/// Processes the new files.
/// </summary>
@@ -81,5 +88,20 @@ namespace MediaBrowser.Controller.FileOrganization
/// <param name="ItemName">Item name.</param>
/// <param name="matchString">The match string to delete.</param>
void DeleteSmartMatchEntry(string ItemName, string matchString);
+
+ /// <summary>
+ /// Attempts to add a an item to the list of currently processed items.
+ /// </summary>
+ /// <param name="result">The result item.</param>
+ /// <param name="fullClientRefresh">Passing true will notify the client to reload all items, otherwise only a single item will be refreshed.</param>
+ /// <returns>True if the item was added, False if the item is already contained in the list.</returns>
+ bool AddToInProgressList(FileOrganizationResult result, bool fullClientRefresh);
+
+ /// <summary>
+ /// Removes an item from the list of currently processed items.
+ /// </summary>
+ /// <param name="result">The result item.</param>
+ /// <returns>True if the item was removed, False if the item was not contained in the list.</returns>
+ bool RemoveFromInprogressList(FileOrganizationResult result);
}
}
diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs
index 6659d1553..387195245 100644
--- a/MediaBrowser.Controller/Session/ISessionManager.cs
+++ b/MediaBrowser.Controller/Session/ISessionManager.cs
@@ -172,15 +172,21 @@ namespace MediaBrowser.Controller.Session
Task SendPlaystateCommand(string controllingSessionId, string sessionId, PlaystateRequest command, CancellationToken cancellationToken);
/// <summary>
- /// Sends the message to user sessions.
+ /// Sends the message to admin sessions.
/// </summary>
/// <typeparam name="T"></typeparam>
- /// <param name="userId">The user identifier.</param>
/// <param name="name">The name.</param>
/// <param name="data">The data.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
- Task SendMessageToUserSessions<T>(string userId, string name, T data, CancellationToken cancellationToken);
+ Task SendMessageToAdminSessions<T>(string name, T data, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Sends the message to user sessions.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <returns>Task.</returns>
+ Task SendMessageToUserSessions<T>(List<string> userIds, string name, T data, CancellationToken cancellationToken);
/// <summary>
/// Sends the message to user device sessions.