Browse Source

fix image upload corruption (#1569)

pull/1570/head
Jason Dove 2 years ago committed by GitHub
parent
commit
6f49233864
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      CHANGELOG.md
  2. 3
      ErsatzTV.Infrastructure/Images/ImageCache.cs

2
CHANGELOG.md

@ -37,6 +37,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -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

3
ErsatzTV.Infrastructure/Images/ImageCache.cs

@ -40,6 +40,9 @@ public class ImageCache : IImageCache @@ -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);
}

Loading…
Cancel
Save