You've already forked Sonarr
							
							
				mirror of
				https://github.com/Sonarr/Sonarr.git
				synced 2025-10-31 00:07:55 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			766 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			766 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| 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);
 | |
|         }
 | |
|     }
 | |
| }
 |