mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Added progress messaging, using info logging
Also extension methods for complete and failed (for coloured UI messaging)
This commit is contained in:
parent
eeda4e83f9
commit
c928ccb201
21 changed files with 191 additions and 32 deletions
24
NzbDrone.Api/ProgressMessaging/ProgressMessageConnection.cs
Normal file
24
NzbDrone.Api/ProgressMessaging/ProgressMessageConnection.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using Microsoft.AspNet.SignalR;
|
||||
using Microsoft.AspNet.SignalR.Infrastructure;
|
||||
using NzbDrone.Api.SignalR;
|
||||
using NzbDrone.Common.Messaging;
|
||||
using NzbDrone.Core.ProgressMessaging;
|
||||
|
||||
namespace NzbDrone.Api.ProgressMessaging
|
||||
{
|
||||
public class ProgressMessageConnection : NzbDronePersistentConnection,
|
||||
IHandleAsync<NewProgressMessageEvent>
|
||||
{
|
||||
public override string Resource
|
||||
{
|
||||
get { return "/ProgressMessage"; }
|
||||
}
|
||||
|
||||
public void HandleAsync(NewProgressMessageEvent message)
|
||||
{
|
||||
var context = ((ConnectionManager)GlobalHost.ConnectionManager).GetConnection(GetType());
|
||||
context.Connection.Broadcast(message.ProgressMessage);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue