aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MediaBrowser.Providers/Manager/ProviderManager.cs5
-rw-r--r--MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs2
-rw-r--r--MediaBrowser.ServerApplication/EntryPoints/ResourceEntryPoint.cs38
-rw-r--r--MediaBrowser.WebDashboard/Api/PackageCreator.cs4
4 files changed, 9 insertions, 40 deletions
diff --git a/MediaBrowser.Providers/Manager/ProviderManager.cs b/MediaBrowser.Providers/Manager/ProviderManager.cs
index 01a89bf26..ffc33fb23 100644
--- a/MediaBrowser.Providers/Manager/ProviderManager.cs
+++ b/MediaBrowser.Providers/Manager/ProviderManager.cs
@@ -150,6 +150,11 @@ namespace MediaBrowser.Providers.Manager
public Task SaveImage(IHasImages item, string source, string mimeType, ImageType type, int? imageIndex, string internalCacheKey, CancellationToken cancellationToken)
{
+ if (string.IsNullOrWhiteSpace(source))
+ {
+ throw new ArgumentNullException("source");
+ }
+
var fileStream = _fileSystem.GetFileStream(source, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, true);
return new ImageSaver(ConfigurationManager, _libraryMonitor, _fileSystem, _logger).SaveImage(item, fileStream, mimeType, type, imageIndex, internalCacheKey, cancellationToken);
diff --git a/MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs b/MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs
index 1651dfae2..ba335868d 100644
--- a/MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs
+++ b/MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs
@@ -27,7 +27,7 @@ namespace MediaBrowser.Server.Startup.Common.EntryPoints
_timer = new Timer(obj =>
{
var now = DateTime.UtcNow;
- if (_sessionManager.Sessions.Any(i => (now - i.LastActivityDate).TotalMinutes < 5))
+ if (_sessionManager.Sessions.Any(i => (now - i.LastActivityDate).TotalMinutes < 15))
{
KeepAlive();
}
diff --git a/MediaBrowser.ServerApplication/EntryPoints/ResourceEntryPoint.cs b/MediaBrowser.ServerApplication/EntryPoints/ResourceEntryPoint.cs
deleted file mode 100644
index e7a33d864..000000000
--- a/MediaBrowser.ServerApplication/EntryPoints/ResourceEntryPoint.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using MediaBrowser.Controller.Plugins;
-using System;
-using System.Threading;
-
-namespace MediaBrowser.ServerApplication.EntryPoints
-{
- public class ResourceEntryPoint : IServerEntryPoint
- {
- private Timer _timer;
-
- public void Run()
- {
- _timer = new Timer(TimerCallback, null, TimeSpan.FromMinutes(1), TimeSpan.FromMinutes(30));
- }
-
- private void TimerCallback(object state)
- {
- try
- {
- // Bad practice, i know. But we keep a lot in memory, unfortunately.
- GC.Collect(2, GCCollectionMode.Forced, true);
- GC.Collect(2, GCCollectionMode.Forced, true);
- }
- catch
- {
- }
- }
-
- public void Dispose()
- {
- if (_timer != null)
- {
- _timer.Dispose();
- _timer = null;
- }
- }
- }
-}
diff --git a/MediaBrowser.WebDashboard/Api/PackageCreator.cs b/MediaBrowser.WebDashboard/Api/PackageCreator.cs
index 4651cca5c..06fbd1a7d 100644
--- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs
+++ b/MediaBrowser.WebDashboard/Api/PackageCreator.cs
@@ -260,7 +260,9 @@ namespace MediaBrowser.WebDashboard.Api
html = _localization.LocalizeDocument(html, localizationCulture, GetLocalizationToken);
- html = html.Replace("<html>", "<html lang=\"" + lang + "\">").Replace("<body>", "<body><div class=\"pageContainer\">").Replace("</body>", "</div></body>");
+ html = html.Replace("<html>", "<html lang=\"" + lang + "\">")
+ .Replace("<body>", "<body><paper-drawer-panel class=\"mainDrawerPanel mainDrawerPanelPreInit\" forceNarrow><div class=\"mainDrawer\" drawer></div><div main><div class=\"pageContainer\">")
+ .Replace("</body>", "</div></div></body>");
}
if (enableMinification)