fixes #273 - Marking/unmarking Favorite status doesn't cause a library changed notification

This commit is contained in:
Luke Pulverenti
2013-10-03 14:02:23 -04:00
parent d021e20249
commit 16b9d26ab5
17 changed files with 352 additions and 22 deletions

View File

@@ -134,7 +134,7 @@ namespace MediaBrowser.Server.Implementations.Session
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
public Task SendRestartRequiredMessage(CancellationToken cancellationToken)
public Task SendRestartRequiredNotification(CancellationToken cancellationToken)
{
var socket = GetActiveSocket();
@@ -145,5 +145,58 @@ namespace MediaBrowser.Server.Implementations.Session
}, cancellationToken);
}
/// <summary>
/// Sends the user data change info.
/// </summary>
/// <param name="info">The info.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
public Task SendUserDataChangeInfo(UserDataChangeInfo info, CancellationToken cancellationToken)
{
var socket = GetActiveSocket();
return socket.SendAsync(new WebSocketMessage<UserDataChangeInfo>
{
MessageType = "UserDataChanged",
Data = info
}, cancellationToken);
}
/// <summary>
/// Sends the server shutdown notification.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
public Task SendServerShutdownNotification(CancellationToken cancellationToken)
{
var socket = GetActiveSocket();
return socket.SendAsync(new WebSocketMessage<string>
{
MessageType = "ServerShuttingDown",
Data = string.Empty
}, cancellationToken);
}
/// <summary>
/// Sends the server restart notification.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
public Task SendServerRestartNotification(CancellationToken cancellationToken)
{
var socket = GetActiveSocket();
return socket.SendAsync(new WebSocketMessage<string>
{
MessageType = "ServerRestarting",
Data = string.Empty
}, cancellationToken);
}
}
}