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>
|
||||
private IEnumerable<VirtualFolderInfo> GetView(string path)
|
||||
{
|
||||
return _fileSystem.GetFileSystemEntryPaths(path)
|
||||
return _fileSystem.GetDirectoryPaths(path)
|
||||
.Select(dir => new VirtualFolderInfo
|
||||
{
|
||||
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 + ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
name += " " + info.StartDate.ToString("yyyy-MM-dd");
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
|
|
@ -1322,8 +1322,9 @@ namespace MediaBrowser.Server.Implementations.Session
|
|||
|
||||
if (existing.Items.Length > 0)
|
||||
{
|
||||
_logger.Debug("Reissuing access token");
|
||||
return existing.Items[0].AccessToken;
|
||||
var token = existing.Items[0].AccessToken;
|
||||
_logger.Debug("Reissuing access token: " + token);
|
||||
return token;
|
||||
}
|
||||
|
||||
var newToken = new AuthenticationInfo
|
||||
|
|
|
@ -513,23 +513,19 @@ namespace MediaBrowser.ServerApplication
|
|||
|
||||
if (!_isRunningAsService)
|
||||
{
|
||||
_logger.Info("Hiding server notify icon");
|
||||
_serverNotifyIcon.Visible = false;
|
||||
//_logger.Info("Hiding server notify icon");
|
||||
//_serverNotifyIcon.Visible = false;
|
||||
|
||||
_logger.Info("Starting new instance");
|
||||
//Application.Restart();
|
||||
Process.Start(_appHost.ServerConfigurationManager.ApplicationPaths.ApplicationPath);
|
||||
|
||||
_logger.Info("Calling Environment.Exit");
|
||||
Environment.Exit(0);
|
||||
ShutdownWindowsApplication();
|
||||
}
|
||||
}
|
||||
|
||||
private static void ShutdownWindowsApplication()
|
||||
{
|
||||
_logger.Info("Hiding server notify icon");
|
||||
_serverNotifyIcon.Visible = false;
|
||||
|
||||
_logger.Info("Calling Application.Exit");
|
||||
Application.Exit();
|
||||
|
||||
|
|
|
@ -140,6 +140,19 @@ namespace MediaBrowser.ServerApplication
|
|||
}
|
||||
|
||||
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)
|
||||
|
|
|
@ -191,6 +191,9 @@
|
|||
<Content Include="dashboard-ui\cordova\fileupload.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\cordova\ios\backgroundfetch.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\cordova\ios\vlcplayer.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
|
Loading…
Reference in New Issue
Block a user