mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 05:57:20 -04:00
Remove DynamicImageResponse local image after saved to metadata folder
Previously, local images provided by DynamicImageResponse were never cleaned up until the server was restarted. This issue has become more severe in 10.10, as the default is now set to use the system's native temp folder, which might be a RAM backed tmpfs. This behavior could lead to resource starvation for long-running servers performing multiple library scans. Metadata plugins prefer the old behavior should do its own backup.
This commit is contained in:
parent
3592c629e7
commit
74d2c2addf
1 changed files with 2 additions and 0 deletions
|
@ -232,6 +232,8 @@ namespace MediaBrowser.Providers.Manager
|
|||
var stream = AsyncFile.OpenRead(response.Path);
|
||||
|
||||
await _providerManager.SaveImage(item, stream, mimeType, imageType, null, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
File.Delete(response.Path);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue