mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
fix windows restart
This commit is contained in:
parent
a3f11aac38
commit
71780d401f
@ -1165,7 +1165,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
/// <returns>IEnumerable{VirtualFolderInfo}.</returns>
|
/// <returns>IEnumerable{VirtualFolderInfo}.</returns>
|
||||||
private IEnumerable<VirtualFolderInfo> GetView(string path)
|
private IEnumerable<VirtualFolderInfo> GetView(string path)
|
||||||
{
|
{
|
||||||
return _fileSystem.GetFileSystemEntryPaths(path)
|
return _fileSystem.GetDirectoryPaths(path)
|
||||||
.Select(dir => new VirtualFolderInfo
|
.Select(dir => new VirtualFolderInfo
|
||||||
{
|
{
|
||||||
Name = Path.GetFileName(dir),
|
Name = Path.GetFileName(dir),
|
||||||
|
@ -67,10 +67,14 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (info.ProductionYear != null)
|
else if (info.IsMovie && info.ProductionYear != null)
|
||||||
{
|
{
|
||||||
name += " (" + info.ProductionYear + ")";
|
name += " (" + info.ProductionYear + ")";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
name += " " + info.StartDate.ToString("yyyy-MM-dd");
|
||||||
|
}
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@ -1322,8 +1322,9 @@ namespace MediaBrowser.Server.Implementations.Session
|
|||||||
|
|
||||||
if (existing.Items.Length > 0)
|
if (existing.Items.Length > 0)
|
||||||
{
|
{
|
||||||
_logger.Debug("Reissuing access token");
|
var token = existing.Items[0].AccessToken;
|
||||||
return existing.Items[0].AccessToken;
|
_logger.Debug("Reissuing access token: " + token);
|
||||||
|
return token;
|
||||||
}
|
}
|
||||||
|
|
||||||
var newToken = new AuthenticationInfo
|
var newToken = new AuthenticationInfo
|
||||||
|
@ -513,23 +513,19 @@ namespace MediaBrowser.ServerApplication
|
|||||||
|
|
||||||
if (!_isRunningAsService)
|
if (!_isRunningAsService)
|
||||||
{
|
{
|
||||||
_logger.Info("Hiding server notify icon");
|
//_logger.Info("Hiding server notify icon");
|
||||||
_serverNotifyIcon.Visible = false;
|
//_serverNotifyIcon.Visible = false;
|
||||||
|
|
||||||
_logger.Info("Starting new instance");
|
_logger.Info("Starting new instance");
|
||||||
//Application.Restart();
|
//Application.Restart();
|
||||||
Process.Start(_appHost.ServerConfigurationManager.ApplicationPaths.ApplicationPath);
|
Process.Start(_appHost.ServerConfigurationManager.ApplicationPaths.ApplicationPath);
|
||||||
|
|
||||||
_logger.Info("Calling Environment.Exit");
|
ShutdownWindowsApplication();
|
||||||
Environment.Exit(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ShutdownWindowsApplication()
|
private static void ShutdownWindowsApplication()
|
||||||
{
|
{
|
||||||
_logger.Info("Hiding server notify icon");
|
|
||||||
_serverNotifyIcon.Visible = false;
|
|
||||||
|
|
||||||
_logger.Info("Calling Application.Exit");
|
_logger.Info("Calling Application.Exit");
|
||||||
Application.Exit();
|
Application.Exit();
|
||||||
|
|
||||||
|
@ -140,6 +140,19 @@ namespace MediaBrowser.ServerApplication
|
|||||||
}
|
}
|
||||||
|
|
||||||
notifyIcon1.DoubleClick += notifyIcon1_DoubleClick;
|
notifyIcon1.DoubleClick += notifyIcon1_DoubleClick;
|
||||||
|
Application.ApplicationExit += Application_ApplicationExit;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Application_ApplicationExit(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
notifyIcon1.Visible = false;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void notifyIcon1_DoubleClick(object sender, EventArgs e)
|
void notifyIcon1_DoubleClick(object sender, EventArgs e)
|
||||||
|
@ -191,6 +191,9 @@
|
|||||||
<Content Include="dashboard-ui\cordova\fileupload.js">
|
<Content Include="dashboard-ui\cordova\fileupload.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="dashboard-ui\cordova\ios\backgroundfetch.js">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="dashboard-ui\cordova\ios\vlcplayer.js">
|
<Content Include="dashboard-ui\cordova\ios\vlcplayer.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user