diff --git a/CHANGELOG.md b/CHANGELOG.md index e813e446..5e0f5bce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Ignore errors deleting old HLS segments; this should improve stream reliability - Update show year when changed within Plex - Fix crop scale behavior with NVIDIA, QSV acceleration +- Fix bug that corrupted uploaded images (watermarks, channel logos) + - Re-uploading images should fix them ### Changed - Upgrade from .NET 7 to .NET 8 diff --git a/ErsatzTV.Infrastructure/Images/ImageCache.cs b/ErsatzTV.Infrastructure/Images/ImageCache.cs index 3b010dd6..07f90205 100644 --- a/ErsatzTV.Infrastructure/Images/ImageCache.cs +++ b/ErsatzTV.Infrastructure/Images/ImageCache.cs @@ -40,6 +40,9 @@ public class ImageCache : IImageCache // ReSharper disable once UseAwaitUsing using (var fs = new FileStream(tempFileName, FileMode.OpenOrCreate, FileAccess.Write)) { + // overwrite anything that's already there + fs.SetLength(0); + await stream.CopyToAsync(fs); }