mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
fixes #406 - Dashboard not refreshing
This commit is contained in:
parent
6d407033ce
commit
cbf061d5f6
@ -1,4 +1,5 @@
|
|||||||
using MediaBrowser.Api;
|
using System.Threading;
|
||||||
|
using MediaBrowser.Api;
|
||||||
using MediaBrowser.Common;
|
using MediaBrowser.Common;
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Common.Constants;
|
using MediaBrowser.Common.Constants;
|
||||||
@ -246,7 +247,7 @@ namespace MediaBrowser.ServerApplication
|
|||||||
|
|
||||||
IsoManager = new IsoManager();
|
IsoManager = new IsoManager();
|
||||||
RegisterSingleInstance(IsoManager);
|
RegisterSingleInstance(IsoManager);
|
||||||
|
|
||||||
RegisterSingleInstance<IBlurayExaminer>(() => new BdInfoExaminer());
|
RegisterSingleInstance<IBlurayExaminer>(() => new BdInfoExaminer());
|
||||||
|
|
||||||
ZipClient = new DotNetZipClient();
|
ZipClient = new DotNetZipClient();
|
||||||
@ -353,7 +354,7 @@ namespace MediaBrowser.ServerApplication
|
|||||||
|
|
||||||
RegisterSingleInstance(NotificationsRepository);
|
RegisterSingleInstance(NotificationsRepository);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Configures the repositories.
|
/// Configures the repositories.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -381,8 +382,8 @@ namespace MediaBrowser.ServerApplication
|
|||||||
private Task ConfigureUserDataRepositories()
|
private Task ConfigureUserDataRepositories()
|
||||||
{
|
{
|
||||||
return UserDataRepository.Initialize();
|
return UserDataRepository.Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Connects to db.
|
/// Connects to db.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -512,6 +513,16 @@ namespace MediaBrowser.ServerApplication
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void Restart()
|
public override void Restart()
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var task = ServerManager.SendWebSocketMessageAsync("ServerRestarting", () => string.Empty, CancellationToken.None);
|
||||||
|
task.Wait();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.ErrorException("Error sending server restart web socket message", ex);
|
||||||
|
}
|
||||||
|
|
||||||
App.Instance.Restart();
|
App.Instance.Restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -571,7 +582,7 @@ namespace MediaBrowser.ServerApplication
|
|||||||
|
|
||||||
// Pismo
|
// Pismo
|
||||||
yield return typeof(PismoIsoManager).Assembly;
|
yield return typeof(PismoIsoManager).Assembly;
|
||||||
|
|
||||||
// Include composable parts in the running assembly
|
// Include composable parts in the running assembly
|
||||||
yield return GetType().Assembly;
|
yield return GetType().Assembly;
|
||||||
}
|
}
|
||||||
@ -622,6 +633,16 @@ namespace MediaBrowser.ServerApplication
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void Shutdown()
|
public override void Shutdown()
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var task = ServerManager.SendWebSocketMessageAsync("ServerShuttingDown", () => string.Empty, CancellationToken.None);
|
||||||
|
task.Wait();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.ErrorException("Error sending server shutdown web socket message", ex);
|
||||||
|
}
|
||||||
|
|
||||||
App.Instance.Dispatcher.Invoke(App.Instance.Shutdown);
|
App.Instance.Dispatcher.Invoke(App.Instance.Shutdown);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user