Explorar el Código

update cache file cleanup

Luke Pulverenti hace 9 años
padre
commit
bd4c99b01a

+ 2 - 2
Emby.Drawing/ImageProcessor.cs

@@ -246,7 +246,7 @@ namespace Emby.Drawing
                     var newHeight = Convert.ToInt32(newSize.Height);
 
                     _fileSystem.CreateDirectory(Path.GetDirectoryName(cacheFilePath));
-                    var tmpPath = Path.Combine(_appPaths.TempDirectory, Guid.NewGuid().ToString("N"));
+                    var tmpPath = Path.ChangeExtension(Path.Combine(_appPaths.TempDirectory, Guid.NewGuid().ToString("N")), Path.GetExtension(cacheFilePath));
                     _fileSystem.CreateDirectory(Path.GetDirectoryName(tmpPath));
 
                     await _imageProcessingSemaphore.WaitAsync().ConfigureAwait(false);
@@ -433,7 +433,7 @@ namespace Emby.Drawing
             try
             {
                 _fileSystem.CreateDirectory(Path.GetDirectoryName(croppedImagePath));
-                var tmpPath = Path.Combine(_appPaths.TempDirectory, Guid.NewGuid().ToString("N"));
+                var tmpPath = Path.ChangeExtension(Path.Combine(_appPaths.TempDirectory, Guid.NewGuid().ToString("N")), Path.GetExtension(croppedImagePath));
                 _fileSystem.CreateDirectory(Path.GetDirectoryName(tmpPath));
 
                 await _imageProcessingSemaphore.WaitAsync().ConfigureAwait(false);

+ 4 - 0
MediaBrowser.Api/Playback/StreamState.cs

@@ -80,6 +80,10 @@ namespace MediaBrowser.Api.Playback
                     {
                         return 10;
                     }
+                    if (userAgent.IndexOf("cfnetwork", StringComparison.OrdinalIgnoreCase) != -1)
+                    {
+                        return 10;
+                    }
 
                     return 6;
                 }

+ 1 - 1
MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs

@@ -71,7 +71,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
 
             progress.Report(90);
 
-            minDateModified = DateTime.UtcNow.AddDays(-2);
+            minDateModified = DateTime.UtcNow.AddDays(-1);
 
             try
             {