From 7a55b563c04c33c3a4ccba136ce6921b4ec7a1bf Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 11 Sep 2024 20:44:04 +0300 Subject: [PATCH] New: Importing `sup` files as subtitles Towards #10412 --- .../Subtitles/SubtitleFileExtensions.cs | 42 ++++++++----------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/src/NzbDrone.Core/Extras/Subtitles/SubtitleFileExtensions.cs b/src/NzbDrone.Core/Extras/Subtitles/SubtitleFileExtensions.cs index 358552018..c20ac4698 100644 --- a/src/NzbDrone.Core/Extras/Subtitles/SubtitleFileExtensions.cs +++ b/src/NzbDrone.Core/Extras/Subtitles/SubtitleFileExtensions.cs @@ -5,30 +5,24 @@ namespace NzbDrone.Core.Extras.Subtitles { public static class SubtitleFileExtensions { - private static HashSet _fileExtensions; - - static SubtitleFileExtensions() + public static HashSet Extensions => new (StringComparer.OrdinalIgnoreCase) { - _fileExtensions = new HashSet(StringComparer.OrdinalIgnoreCase) - { - ".aqt", - ".ass", - ".idx", - ".jss", - ".psb", - ".rt", - ".smi", - ".srt", - ".ssa", - ".sub", - ".txt", - ".utf", - ".utf8", - ".utf-8", - ".vtt" - }; - } - - public static HashSet Extensions => _fileExtensions; + ".aqt", + ".ass", + ".idx", + ".jss", + ".psb", + ".rt", + ".smi", + ".srt", + ".ssa", + ".sub", + ".sup", + ".txt", + ".utf", + ".utf8", + ".utf-8", + ".vtt" + }; } }