aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-09-21 21:05:33 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-09-21 21:05:33 -0400
commit71780d401f9521d7b76ac773e7b048de55ff2380 (patch)
tree8024a3c385861b5bec619bf8aaecfda86245c51c
parenta3f11aac38f4cd26997fe2b9cc9178380f3c9192 (diff)
fix windows restart
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs2
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs6
-rw-r--r--MediaBrowser.Server.Implementations/Session/SessionManager.cs5
-rw-r--r--MediaBrowser.ServerApplication/MainStartup.cs10
-rw-r--r--MediaBrowser.ServerApplication/ServerNotifyIcon.cs13
-rw-r--r--MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj3
6 files changed, 28 insertions, 11 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index 26961c490..966c1e037 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -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),
diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs
index 5b83d63b1..3ee808bb5 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs
@@ -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;
}
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
index 70a4cb439..d9c3ed7a6 100644
--- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs
+++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
@@ -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
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs
index 968172bc3..80b7d230a 100644
--- a/MediaBrowser.ServerApplication/MainStartup.cs
+++ b/MediaBrowser.ServerApplication/MainStartup.cs
@@ -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();
diff --git a/MediaBrowser.ServerApplication/ServerNotifyIcon.cs b/MediaBrowser.ServerApplication/ServerNotifyIcon.cs
index 3501c8c27..dd9e5d5f0 100644
--- a/MediaBrowser.ServerApplication/ServerNotifyIcon.cs
+++ b/MediaBrowser.ServerApplication/ServerNotifyIcon.cs
@@ -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)
diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
index 23e13da07..dfa58ad04 100644
--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
@@ -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>