Luke Pulverenti 10 vuotta sitten
vanhempi
sitoutus
95ac98d5d4

+ 5 - 0
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);

+ 1 - 1
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();
                 }

+ 0 - 38
MediaBrowser.ServerApplication/EntryPoints/ResourceEntryPoint.cs

@@ -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;
-            }
-        }
-    }
-}

+ 3 - 1
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)