From 557b8f0c7879261d2dc8268e77836fd6efb7feb8 Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Sun, 17 Mar 2024 20:45:00 +0800 Subject: [PATCH] Apply suggestions from code review Drop the unnecessary initial capacity from the list. Signed-off-by: nyanmisaka --- .../MediaEncoding/TranscodingSegmentCleaner.cs | 2 +- MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Controller/MediaEncoding/TranscodingSegmentCleaner.cs b/MediaBrowser.Controller/MediaEncoding/TranscodingSegmentCleaner.cs index a6d812873..67bfcb02f 100644 --- a/MediaBrowser.Controller/MediaEncoding/TranscodingSegmentCleaner.cs +++ b/MediaBrowser.Controller/MediaEncoding/TranscodingSegmentCleaner.cs @@ -156,7 +156,7 @@ public class TranscodingSegmentCleaner : IDisposable } catch (IOException ex) { - (exs ??= new List(4)).Add(ex); + (exs ??= new List()).Add(ex); _logger.LogDebug(ex, "Error deleting HLS segment file {Path}", file); } } diff --git a/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs b/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs index 2a72cacdc..499e5287a 100644 --- a/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs +++ b/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs @@ -321,7 +321,7 @@ public sealed class TranscodeManager : ITranscodeManager, IDisposable } catch (IOException ex) { - (exs ??= new List(4)).Add(ex); + (exs ??= new List()).Add(ex); _logger.LogError(ex, "Error deleting HLS file {Path}", file); } }