diff --git a/Kyoo/Kyoo.csproj b/Kyoo/Kyoo.csproj index 205b8458..70fae8ca 100644 --- a/Kyoo/Kyoo.csproj +++ b/Kyoo/Kyoo.csproj @@ -32,6 +32,7 @@ + diff --git a/Kyoo/Models/FileExtensions.cs b/Kyoo/Models/FileExtensions.cs index b42b4be2..d023c039 100644 --- a/Kyoo/Models/FileExtensions.cs +++ b/Kyoo/Models/FileExtensions.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; +using System.Collections.Immutable; using System.IO; -using System.Linq; namespace Kyoo.Models.Watch { @@ -12,7 +12,7 @@ namespace Kyoo.Models.Watch /// /// The list of known video extensions /// - public static readonly string[] VideoExtensions = + public static readonly ImmutableArray VideoExtensions = new() { ".webm", ".mkv", @@ -53,11 +53,11 @@ namespace Kyoo.Models.Watch /// /// The dictionary of known subtitles extensions and the name of the subtitle codec. /// - public static readonly Dictionary SubtitleExtensions = new() + public static readonly ImmutableDictionary SubtitleExtensions = new Dictionary { {".ass", "ass"}, {".str", "subrip"} - }; + }.ToImmutableDictionary(); /// /// Check if a file represent a subtitle file (only by checking the extension of the file)