mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
@@ -66,10 +66,10 @@ namespace NzbDrone.Host.Middleware
|
||||
x.MapHub<MessageHub>("/signalr/messages");
|
||||
});
|
||||
#endif
|
||||
|
||||
// This is a side effect of haing multiple IoC containers, TinyIoC and whatever
|
||||
// Kestrel/SignalR is using. Ideally we'd have one IoC container, but that's non-trivial with TinyIoC
|
||||
// TODO: Use a single IoC container if supported for TinyIoC or if we switch to another system (ie Autofac).
|
||||
|
||||
var hubContext = appBuilder.ApplicationServices.GetService<IHubContext<MessageHub>>();
|
||||
_container.Register(hubContext);
|
||||
}
|
||||
|
||||
@@ -91,13 +91,17 @@ namespace NzbDrone.Host
|
||||
.AddSignalR()
|
||||
#if !NETCOREAPP
|
||||
.AddJsonProtocol(
|
||||
#else
|
||||
.AddNewtonsoftJsonProtocol(
|
||||
#endif
|
||||
options =>
|
||||
{
|
||||
options.PayloadSerializerSettings = Json.GetSerializerSettings();
|
||||
});
|
||||
#else
|
||||
.AddNewtonsoftJsonProtocol(
|
||||
options =>
|
||||
{
|
||||
options.PayloadSerializerSettings = Json.GetSerializerSettings();
|
||||
});
|
||||
#endif
|
||||
})
|
||||
.Configure(app =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user